Diameter of an Ellipse at an Angle A standard ellipse with semi-major axis $a$, semi-minor $b$ has a "diameter" of $2a$ in one dimension ($\phi=0$) and $2b$ in the other ($\phi=\pi/2$).  Is there a function to find the diameter for an arbitrary angle $\phi$?  By "diameter", I mean the distance between two parallel tangents perpendicular to $\phi$.  In everyday terms, how wide is the shadow cast by an ellipse when viewed from any angle.
Secondary related question: what's the proper mathematical term for what I mean by "diameter" above; projecting the shadow of the ellipse into 1D and finding the length?
 A: This is quite easy to work out if you use homogeneous coordinates of points and lines and a matrix to represent the ellipse, and then work with the dual conic. Setting $\mathbf x=(x,y,1)^T$, we can write the equation of your standard-position ellipse as $\mathbf x^TC\mathbf x=0$, where $C=\operatorname{diag}(1/a^2,1/b^2,-1)$. (Multiply it out for yourself to verify.) At the same time, by setting $\mathbf l=(a,b,c)^T$, the general equation $ax+by+c=0$ of a line can be written $\mathbf l^T\mathbf x=0$, i.e., lines can also be represented as vectors of real numbers. A major advantage of this representation in my mind is that there are no special cases to worry about. Vertical lines, which are usually problematic if you’re basing things on slope, are accommodated in this framework with no fuss.  
Now, if $C$ is the matrix of a nondegenerate conic, then tangent lines to the conic satisfy the dual equation $\mathbf l^TC^{-1}\mathbf l=0$. Also, all lines that have a normal that makes an angle of $\phi$ with the positive $x$-axis are of the form $(\cos\phi,\sin\phi,\tau)^T$, where the signed distance of the line from the origin is given by $\tau$. By symmetry, then, the distance between two parallel tangents is $2|\tau|$. Expanding the dual equation, we have $$\begin{bmatrix}\cos\phi&\sin\phi&\tau\end{bmatrix} \begin{bmatrix}a^2&0&0\\0&b^2&0\\0&0&-1\end{bmatrix} \begin{bmatrix}\cos\phi\\\sin\phi\\\tau\end{bmatrix} = a^2\cos^2\phi+b^2\sin^2\phi-\tau^2=0,$$ from which the distance between the two tangents is simply $$2\sqrt{a^2\cos^2\phi+b^2\sin^2\phi}.$$
A: The equation for an eclipse in polar coordinates
$r(\theta) = \frac {ab} {\sqrt {(b \cos\theta)^2 + (a \sin\theta)^2}}$
When $\theta = 0, r=a$, and when $\theta = \frac\pi 2, r = b$
So the formula you’re looking for (where $d = 2r$) is
$r(\theta) = \frac {2ab} {\sqrt {(b \cos\theta)^2 + (a \sin\theta)^2}}$
EDIT: misunderstood the question
A: My previous answer was wrong, because I used the distance from the tangent point to the origin.  What I should have used was the closest approach of the tangent line to the origin.  Per distance from a point to a line, the line
$$Ax+By+C=0$$
approaches within
$$\frac{C}{\sqrt{A^2+B^2}}$$
of the origin.  Per ellipse tangent slope as parameter, the ellipse
$$\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$$
has a tangent line at slope $m$ of
$$y=mx\pm\sqrt{m^2a^2+b^2}\quad\implies\quad mx-y\pm\sqrt{m^2a^2+b^2}=0\,.$$
Substituting gives the origin distance of the ellipse tangent of
$$\sqrt{\frac{m^2a^2+b^2}{m^2+1}}\,.$$
We simply double the above to find the width of the ellipse projected at angle $\phi$ such that the slope $m=\tan\phi$:
$$2\sqrt{\frac{a^2\tan^2\phi+b^2}{\tan^2\phi+1}}\,.$$
Noting that $\tan\phi\cos\phi=\sin\phi$ we can multiply denominator and numerator by $\cos^2\phi$ to give:
$$2\sqrt{\frac{a^2\sin^2\phi+b^2\cos^2\phi}{\sin^2\phi+\cos^2\phi}} \\= 2\sqrt{a^2\sin^2\phi+b^2\cos^2\phi}$$
and so remove the singularities at angles like $\phi=\frac\pi2$ which were an artefact of the parameterisation.
