I am trying to figure out the correct equation or at least an approximate equation for the conditions:
$ \phi_{x,y} < 45\deg $
$ \phi_z = [0, 2*pi] $
For an elliptical curve in 2D (XY plane). However, as indicated by the conditions, I also care about how its rotation around the X and Y axes affect the projected shape of it on the XY plane at z=0 (And assuming all points of the 3D curve are $< 0$ or $> 0$). To clarify, when I refer to $\phi_{xyz}$ I am saying rotations about XYZ axes. I tried a few different approximation methods such as using a 2D rotation applied to the a and b vectors and using this equation found by another user: What is the general equation of the ellipse that is not in the origin and rotated by an angle?
Such that I get:
$ \frac{\left((x-h) \cos \phi_z + (y-k) \sin \phi_z\right)^2}{a'^2} + \frac{\left((x-h) \sin \phi_z - (y-k) \cos \phi_z\right)^2}{b'^2} = 1 $
I solved $a'^2$ and $b'^2$ by:
$ A_0 = \begin{pmatrix} a_x \\ a_y \end{pmatrix}, \quad B_0 = \begin{pmatrix} b_x \\ b_y \end{pmatrix} $
Where:
$ a_x = a \cos \phi_z, \quad a_y = a \sin \phi_z $
Matrix $R$ and the transformed matrix $A_1$:
$ R = \begin{pmatrix} \cos \phi_z & -\sin \phi_z \\ \sin \phi_z & \cos \phi_z \end{pmatrix} $
$ A_1 = R A_0 = \begin{pmatrix} a_x \cos \phi_z - a_y \sin \phi_z \\ a_x \sin \phi_z + a_y \cos \phi_z \end{pmatrix} $
$ a' = \sqrt{A_{z,x}^2 + A_{z,y}^2} $
$ a'^2 = a^2 (cos^2\phi_z cos^2 \phi_y + sin^2\phi_z cos^2 \phi_x) $
Similar operations for $B_1$ lead to $b'^2$. But when I plot it and modify the angles, it alters the size of the ellipse for both of the x and y components of a and b. So I tried a dumber way that I knew was wrong but hoping given the conditions, it may work under those at least:
$ A(x'-h)^2 + B(x'-h)(y'-k) + C(y'-k)^2 = 1 $
$ A = \frac{\cos^2 \phi}{a^2} + \frac{\sin^2 \phi}{b^2}, $ $ B = 2 \cos \phi \sin \phi \left( \frac{1}{a^2} - \frac{1}{b^2} \right), $ $ C = \frac{\sin^2 \phi}{a^2} + \frac{\cos^2 \phi}{b^2} $
$ x' = xcos\phi_y, \quad y' = ycos\phi_x $
Also didn't work. Even when I went as far as to use the actual 3D rotation matrix $R$ and it still did not give a correct solution. The other problem with it is that the order of rotation shouldn't matter physically (Since I am trying to model something physical with this and only care about final orientation) but that does matter in the math. I am not trying to model a time dependent process and only care about the final orientation of this parametric curve in R3, projected into R2, so I don't even think that using the formal Rotation matrix RzRyRx is even appropriate here since the order matters where in reality it shouldn't. Any other recommendations others have or maybe can point out what I did incorrectly in some of the different methods I tried and showed here that can give an accurate solution? Is there even an analytical solution or do I need to resort to numerical computation? Ideally I'd like to have a solution that works for the conditions:
$ \phi_{x,y} <= 180\deg $
$ \phi_z = [0, 2*pi] $
But if it gets too complicated, then the initial condition pair I mentioned is okay too.