<p>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.</p>

CC BY-SA 3.0
2013-07-07T16:53:23.487Z
2013-07-08T02:13:22.890Z
2013-07-08T02:13:22.890Z
David Eppstein
<p>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:</p>

<p>Given:</p>

<ul>
<li>The position of the "camera" $\vec{O}$.</li>
<li>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).</li>
<li>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$.</li>
<li>The shortest distance from the camera to projection plane $h$</li>
<li>The point $\vec{P}$ which needs to be projected.</li>
</ul>

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

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

<p>$x=\vec{\alpha}\cdot\vec{X}$</p>

<p>$y=\vec{\alpha}\cdot\vec{Y}$</p>

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

<linear-algebra>
What is the advantage of a transformation matrix in perspective projection?
fibonatic
# What is the advantage of a transformation matrix in perspective projection?

(Asked by: username_0 on 2013-04-29)

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?

**Tags:** linear-algebra


---

## 1 answers

### Answer by username_1 on 2013-07-07. Score: 3

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.


---

