Relation of ellipse semi-axes with rotation angle and projection length In the following setup, assume $w$ (length of the projection of the ellipse) and $\theta$ (the rotation angle) are known. I want to know what equation(s) do I have here that helps me to derive the semi-axes ($a$ and $b$) of the ellipse based on $w$ and $\theta$.
I know the semi-axes are not unique in this problem but only the relation is needed.

 A: $$\large 4(a^2\sin^2\theta+b^2\cos^2\theta)=w^2$$
Equation of an ellipse is:
$$\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$$
Diffrentiate:
$$\frac{dy}{dx}=-\frac{b^2}{a^2}.\frac{x}{y}$$
Polar form of ellipse:
$$P(\phi)\equiv(a\cos\phi,b\sin\phi)$$
Slope of tangent in polar form:
$$m=-\frac ba\cot\phi$$
Equation of tangent:
$$\frac xa\cos\theta+\frac yb \sin\theta=1$$
Distance between two parallel lines in form:
$$ax+by+c=0\\ax+by+c'=0$$
is:
$$d=\frac{|c-c'|}{\sqrt{a^2+b^2}}$$


*

*Firstly those two lines are tangent at two points, and they are parallel too. So in the parametric form the slope of tangent at these two points – let them be called $P(\theta_1),Q(\theta_2)$ – must be equal.


*

*slope $\propto\cot\phi$, where $\phi$ is parametric angle.
$$\implies \cot \theta_1=\cot\theta_2\implies \theta_1=\pi+\theta_2\quad\text{since}\quad\theta_1\ne\theta_2$$


*Secondly the distance between the two tangents / two parallel lines must be $w$:


*

*Tangent Lines are $$\frac xa\cos\theta_1+\frac yb\sin\theta-1=0\\\frac xa\cos\theta+\frac yb\sin\theta+1=0$$ (after putting $\theta_2=\pi+\theta_1$). So taking distance between them:
$$\frac{|1-(-1)|}{\sqrt{\frac{\cos^2\theta_1}{a^2}+\frac{\sin^2\theta_1}{b^2}}}=w$$


*Thirdly slope of tangents at these points is $\theta$ so:
$$-\frac{b^2}{a^2}\cot\theta_1=\tan\theta$$
Try the rest yourself.
A: The unrotated ellipse can be parametrized as
$$\begin{pmatrix}a\cos\varphi\\b\sin\varphi\end{pmatrix}$$
so the rotated form (given the fact that you are apparently measuring rotation angle against vertical instead of horizontal and clockwise instead of counter-clockwise) would be
$$\begin{pmatrix}
\sin\theta & -\cos\theta \\
\cos\theta & \sin\theta
\end{pmatrix}
\begin{pmatrix}a\cos\varphi\\b\sin\varphi\end{pmatrix}
$$
The $x$ coordinate of that is
$$x=a\cos\varphi\sin\theta - b\sin\varphi\cos\theta$$
To look for extremal values in $x$ direction, compute the derivative:
$$\frac{\mathrm dx}{\mathrm d\varphi} =
-a\sin\varphi\sin\theta-b\cos\varphi\cos\theta\overset!=0\tag1$$
Take this equaton together with a second equation to express your width. All my ellipses so far are centered around the origin, so the maximal $x$ coordinate is at distance $\frac w2$ from the vertical axis, which leads to the second equation
$$x=a\cos\varphi\sin\theta - b\sin\varphi\cos\theta\overset!=\frac w2\tag2$$
Now you can combine these two equations to eliminate $\varphi$. I did so using resultants. The result is a single equation
$$w^2=(2a\sin\theta)^2+(2b\cos\theta)^2\tag3$$
Actually the resultants offer a second possible solution, namely $(a\sin\theta)^2+(b\cos\theta)^2=0$, but that's a degenerate situation where at least one of your semi-axes has length zero.
I coudln't yet make Wolfram Alpha do the variable elimination. In case you are interested in the Sage code behind my computation, here it is:
sage: R1.<t, sintheta, costheta, a, b, w> = QQ[]
sage: cosphi = (1-t^2)/(1+t^2) # rational parametrization
sage: sinphi = (2*t)/(1+t^2)
sage: v1 = vector([a*cosphi, b*sinphi])
sage: rottheta = matrix([
....: [sintheta,-costheta],
....: [costheta,sintheta]])
sage: v2 = rottheta*v1
sage: c1 = v2[0].derivative(t)
sage: c2 = v2[0] - w/2
sage: c3 = c1.numerator().resultant(c2.numerator(), t)
sage: c3.factor()
(4) * (-4*sintheta^2*a^2 - 4*costheta^2*b^2 + w^2) * (sintheta^2*a^2 + costheta^2*b^2)

