1
$\begingroup$

I was messing around with perspective projection. And it got me wondering whether using a perspective transformation matrix is the most efficient way. Because I also came up with another method which seems to need about the same amount of calculations:

Given:

  • The position of the "camera" $\vec{O}$.
  • The normalized vector $\vec{n}$ in the direction in which the camera is looking (normal of the plane on which the points will be projected).
  • Vectors $\vec{X}$ and $\vec{Y}$ which determine the orientation of the projection. Both should lie in the projection plane and together with $\vec{n}$ should span an orthonormal basis in the $\mathbb{R}^3$.
  • The shortest distance from the camera to projection plane $h$
  • The point $\vec{P}$ which needs to be projected.

$\vec{\Delta}=\vec{P}-\vec{O}$ with $\vec{\Delta}$ the relative coordinates of $\vec{P}$ with respect to $\vec{O}$.

$\vec{\alpha}=h\left(\frac{\vec{\Delta}}{\vec{\Delta}\cdot\vec{n}}-\vec{n}\right)$

$x=\vec{\alpha}\cdot\vec{X}$

$y=\vec{\alpha}\cdot\vec{Y}$

Or do methods, which use transformation matrices, use eigen-value/vectors to reduce the amount of calculations?

$\endgroup$
2
$\begingroup$

One advantage of transformation matrices over direct calculations is that you can compose transformations simply by multiplying matrices. E.g. you might have different transformations for basic motions such as rolling, panning, or dollying the camera and doing similar things to the objects in the scene. Keeping track of all this in a direct calculation becomes an unmaintainable mess.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.