[Math] what is the equation of a rotated ellipsoid

elliptic-equationsrotations

I used this equation for rotated 2D ellipse:

$$\frac{(x\cos\theta+y\sin\theta)^2}{a^2} +\frac{(x\sin\theta-y\cos\theta)^2}{b^2} =1$$

$a$, $b$ are major-axis and minor-axes length of the ellipse and $\theta$ is the rotation angle.

what is this kind of equation for the rotated ellipsoid in 3D?
we have $a$, $b$ and $c$ that are 3 axes length of ellipsoid and $\theta , \phi$ which are rotation angle in horizontal plane and vertical plane respectively. Can anyone help me please?

Thank you in advance.

Best Answer

The equation of unrotated the ellipsoid in 3D is $$\frac{x^2}{a^2}+\frac{y^2}{b^2}+\frac{z^2}{c^2}=1$$ Write the rotation matrices (you can look it up on wikipedia). You have $(x',y',z')^T=R(\theta,\phi)\cdot(x,y,z)^T$ This yield each of $x',y',z'$ as linear combinations of $x,y,z$. Now just plug in $x',y',z'$ instead of $x,y,z$ in the first equation, and you are done.