Perspective geometry proof: projection of an ellipse is always an ellipse

conic sectionsgeometryprojective-geometry

The purpose of this question is to show that the image of an ellipse in a plane (not necessarily one parallel to the image plane), is also an ellipse assuming perspective projection.

In general, a conic is described by the following equation :
$$
Ax^2+Bxy+Cy^2+Dx+Ey+F=0
$$

Then the perspective projection matrix $P\in\mathbb{R}^{3\times 3}$ allows the transformation of points from the ellipse plane to the points in the image plane using homogeneous coordinates as follow:
$$
\begin{pmatrix}
x&y&1
\end{pmatrix}
\begin{pmatrix}
A&\frac{B}{2}&\frac{D}{2}\\
\frac{B}{2}&C&\frac{E}{2}\\
\frac{D}{2}&\frac{E}{2}&F\\
\end{pmatrix}
\begin{pmatrix}
x\\y\\1
\end{pmatrix}=0$$

My question is how can we deduce from here that the ellipse gets mapped to an ellipse assuming perspective projection?

The projection is done as follow: Given an eyepoint $\mathbf{E}$, we want to perspectively project the ellipse from the plane $(R_{w})$ where $w$ stands for "world" as in "world coordinates frame" onto another plane $(R_{IM})$.
$$
(R_{w})\mapsto (R_{IM})
$$

That plane has unit length normal $\mathbf{n}$ and origin point $\mathbf{e}$
enter image description here

Best Answer

The original ellipse in space can be specified parametrically by

$ p(t) = v_0 + v_1 \cos t + v_2 \sin t $

where $v_0, v_1 , v_2 \in \mathbb{R}^3$ are the center, and the two semi-axes, respectively.

In terms of the vector $w = [\cos t, \sin t, 1 ]^T$, we have

$ p(t) = V w $ with $ V = [v_1, v_2, v_0] $

Now the rays from the eyepoint $E$ to $p(t)$ can be expressed parametrically as

$ q(t) = E + s (p(t) - E) = E + s F w $

with $F = [v_1, v_2, v_0 - E] $

From which it follows that

$ q(t) - E = s F w $

i.e.

$w = \dfrac{1}{s} F^{-1} (q(t) - E)$

However $w = [\cos t, \sin t , 1 ]$ satisfies

$w^T Q_0 w = 0 $

where $Q_0 = \text{diag} \{1, 1, -1 \} $

Therefore, the rays $q(t) $ satisfy

$ \dfrac{1}{s^2} (q(t) - E)^T F^{-T} Q_0 F^{-1} (q(t) - E) = 0 $

We can assume that $s \ne 0$. And this the equation of an elliptical cone that is formed by the point $E$ and $p(t)$.

To complete the analysis, I will define the vector

$N = v_0 - E $

to be the vector connecting $E$ to $v_0$, and will take the projection plane to have a normal vector $N$ and passing through $r_0 = E + \alpha N $ for some $\alpha \gt 0$. Therefore, the equation of the projection plane is

$ N^T (r - r_0) = 0 $

Next, we'll apply an affine transformation to the vector $q$ of the cone as follows

$q' = F^{-1} (q - E) $

It then follows that $q'^T Q_0 q' = 0 $

And this is the equation of a right circular cone with axis along the $z'$ axis with a semi-vertical angle of $45^\circ$. Applying the same transformation to the projection plane, results in

$ r = E + F (r') $

which we substitute into the equation of the plane, to obtain,

$ N^T (E + F r' - r_0) = 0 $

noting that $r_0 - E = \alpha N$, then,

$ N^T F r' = \alpha (N^T N) $

Which can be written as

$ (F^T N)^T (r') = \alpha (N^T N) $

This plane (in the transformed space) is intersecting the right circular cone (also in the same transformed space), and the intersection will be an ellipse if the angle between the normal to the plane (which is given by $F^T N $) and the $z'$ axis is less than $ 45^\circ$. Using the dot product between $[0, 0, 1]^T$ and $(F^T N)$ we get,

$ k \cdot F^T N = [0, 0, 1] F^T N = N^T N = \cos \theta | F^T N | $

But $|F^T N | = \sqrt{ (v_1^T N)^T + (v_2^T N) + (N^T N)^2 }$

Since we want $\theta \lt 45^\circ$ , then we want,

$\dfrac{ N^T N }{\sqrt{(v_1^T N)^2 + (v_2^T N)^2 + (N^T N)^2 } } \gt \dfrac{1}{\sqrt{2}} $

which upon manipulating the denominator becomes:

$\dfrac{ 1 }{\sqrt{ \dfrac{|v_1|^2}{N^T N} \cos^2 \theta_1 + \dfrac{|v_2|^2}{N^T N} \cos^2 \theta_2 + 1 } } \gt \dfrac{1}{\sqrt{2}} $

where $\theta_1$ is the angle between $v_1$ and $N$ and $\theta_2$ is the angle between $v_2$ and $N$

The last inequality is equivalent to

$|v_1|^2 \cos^2 \theta_1 + |v_2|^2 \cos^2 \theta_2 \lt N^T N $

And this can be achieved if the vector $N$ is large enough with respect to $v_1$ and $v_2$.

Assuming condition is satisfied, then the intersection curve will be an ellipse which can be computed, but for our purposes, we can just assume that it is

$q'(t) = q_0 + q_1 \cos t + q_2 \sin t $

For some $q_0, q_1, q_2$

At the final step, we will obtain $q$ from $q'$ using the fact that $ q = E + F q' $

Thus, the intersection curve is

$q(t) = E + F q_0 + F q_1 \cos t + F q_2 \sin t $

which is an ellipse.