Perspective projection of a sphere on a plane I know the perspective projection of a sphere on a plane is an ellipse. How would I find the parametric equation for this ellipse? 
Say I have a camera at $(0, 0, z_2)$, a plane at $z=z_1$, and a sphere with radius $r$ centered at $(x_0, y_0, z_0)$. Specifically I want to find the equation of the ellipse created by the intersection of the plane with a cone with apex at the camera and tangent to the sphere. 
I made a model in GeoGebra in case it helps: http://ggbtu.be/mCbZok04r
 A: WLOG I assume that $z_2=0$.
Let a ray be cast to the viewing plane in an arbitrary direction $\vec d=(x,y,z_1)$, so that a point along it is $t\vec d$. If we plug the coordinates to the sphere equation,
$$(t\vec d-\vec c)^2=r^2,$$
we get a second degree equation in $t$
$$\vec d^2t^2-2\vec d\cdot\vec c t+\vec c^2-r^2=0.$$
The ray passes through the apparent outline when the equation has a double root, i.e. when
$$(\vec d\cdot\vec c)^2-\vec d^2(\vec c^2-r^2)=0,$$
or
$$(xx_0+yy_0+z_1z_0)^2-(x^2+y^2+z_1^2)(x_0^2+y_0^2+z_0^2-r^2)=0.$$
This is the implicit equation of the searched ellipse. You can reduce it to the canonical form by well-kown techniques of translation and rotation (also).
A: I’m going to assume that you’re familiar with homogeneous coordinates. The outline of a smooth surface under a central projection is the intersection with the image plane of rays from the viewpoint (camera center) that are tangent to the surface. For a quadric surface described by the symmetric matrix $\mathtt Q$, the resulting curve has a fairly simple representation in terms of dual conics/quadrics.  
Let $\mathtt P$ be the $4\times 3$ projection (camera) matrix. A line $\mathbf l$ in the image back-projects to the plane $\mathtt P^T\mathbf l$. For this plane to be tangent to $\mathtt Q$, it must satisfy the dual quadric equation $$(\mathtt P^T\mathbf l)^T\mathtt Q^*(\mathtt P^T\mathbf l) = \mathbf l^T(\mathtt P\mathtt Q^*\mathtt P^T)\mathbf l = 0,$$ therefore the outline $\mathtt C$ of the image of $\mathtt Q$ is given by the dual formula $$\mathtt C^* = \mathtt P\mathtt Q^*\mathtt P^T.$$ For a nondegenerate quadric, we can take $\mathtt Q^*=\mathtt Q^{-1}$, so $\mathtt C$ can be computed as $\mathtt C = \left(\mathtt P\mathtt Q^{-1}\mathtt P^T\right)^{-1}$, though using cofactor matrices instead of inverses might be more convenient in practice. For a sphere, this curve will be an ellipse unless the sphere intersects the camera’s principal plane, in which case the outline will be a parabola or hyperbola instead.  
You can then develop a parameterization of this curve by finding its center and principal axes using standard techniques such as those outlined here. Note that for an ellipse (and hyperbola), we already know its center: it’s the pole of the line at infinity, which is just the last row/column of $\mathtt C^*$. It’s also not necessary to compute the principal axes. Even though in the parameterization $\mathbf a\cos t+\mathbf b\sin t+\mathbf c$ (where $\mathbf c$ is the center), the vectors $\mathbf a$ and $\mathbf b$ usually correspond to the ellipse’s principal semiaxes, they can in fact be derived from any pair of conjugate radii. So, you can choose any convenient point $\mathbf p$ on the ellipse and set $\mathbf a=\mathbf p-\mathbf c$. A corresponding $\mathbf b$ can then be found by using the fact that the conjugate diameter is parallel to the tangent at $\mathbf p$, i.e., to the line $\mathtt C\mathbf p$.  
When the surface is a sphere, there’s a relatively simple alternative to the above, namely, parameterize the outline generator $\mathbf\Gamma$ and project that. $\mathbf\Gamma$ is the locus of the tangent points of the rays that produce the outline. For a quadric, it’s the intersection of the surface with the polar plane $\mathtt Q\mathbf p$ of the viewpoint $\mathbf p$—a circle in this case. You can produce a parameterization of this circle of the form $R\mathbf u\cos t+R\mathbf v\sin t+\mathbf c$, where $\mathbf u$ and $\mathbf v$ are orthogonal unit vectors parallel to the polar plane, which you can then project by multiplying by $\mathtt P$. This parameterization isn’t as “nice” as the one developed above, though. After dehomogenization, the coordinates will have terms involving $\cos t$ and $\sin t$ in both the numerator and denominator. 
A: Here is a geometric approach that gives you the axes of the ellipse. You can then derive a parametric equation from them. 
Find the line that passes through the camera and the center of the sphere. This is the axis of the cone.
Project that line onto the plane. The major axis of the ellipse will lie on the projected line.
Let $L$ be the distance from the camera to the center of the sphere.
The half aperture angle $\theta$ of the cone is then $\arcsin(r/L).$
Construct lines through the camera position at angle $\theta$ to the axis of the cone, passing through the projected line in the plane. The points where these lines intersect the plane are the ends of the major axis of the ellipse.
The center of the ellipse is the midpoint of the major axis. 
You now have the center of the ellipse and the length and orientation of its major axis.
This tells you the orientation of the minor axis as well.
Find $\sin(\beta),$ where $\beta$ is the angle between the cone’s axis and the projection plane.
Then the eccentricity of the ellipse is
$$
e = \frac {\cos(\beta)}{\cos(\theta)}.
$$
From the semi-major axis length and the eccentricity you can find the semi-minor axis and complete the parameterization of the ellipse.
