Obtain angles of rotation needed to place a given ellipsoid (most general form) in (0,0,0).

256 Views Asked by At

I will try to describe my problem as good as I possibly can, I'm no math expert (I'm an engineering student, he he... jk), so bear with me.

So, given an ellipsoid in its general form, that is: $$a_{11}x^2+a_{12}xy+a_{13}xz+a_{10}x+a_{22}y^2+a_{23}yz+a_{20}y+a_{33}z^2+a_{30}z+a_{00},$$ find the values of the semiaxes of the ellipsoid ($a, b, c $), the coordinates of the geometric center ($x_0,y_0,z_0$) and the angles ($\phi,\theta,\psi$) needed to orientate the surface so that it is expressed on its canonical form: $$x^2/a^2+y^2/b^2+z^2/c^2=1.$$ In this notation, the angles are rotations through the $x$, $y$ and $z$ axes, respectively.

MY ATTEMPT.

If we define the matrix $\mathbf{A}$ as:

$$\mathbf{A}= \begin{bmatrix} a_{11} & a_{12}/2 & a_{13}/2 \\ a_{12}/2 & a_{22} & a_{23}/2 \\ a_{13}/2 & a_{23}/2 & a_{33} \end{bmatrix} $$ and finding its eigenvalues will give me the semiaxes, but, in which order? I mean, I've implemented this procedure on MATLAB and it gives these eigenvalues sorted. In order to test my implementation I obtained the equation of a transformed ellipsoid (rotated and translated) by means of: $$(\mathbf{x}-\mathbf{x}_0)^T\mathbf{R}^T\mathbf{A}\mathbf{R}\mathbf({\mathbf{x}-\mathbf{x}_0})-1=0.$$ So, how can I tell which are the actual values of the original ellipsoid? For example, If I assing $a=2$, $b=1$ and $c=3$ and some random angles and translations, MATLAB will always tell me that the eigenvalues of this particular matrix are 1/9, 1/4 and 1.

Regarding translations, finding the solution of the following set of equations will give us the coordinates of the center. \begin{cases} \dfrac{\partial \Gamma}{\partial x}=0 \\ \dfrac{\partial \Gamma}{\partial y}=0\\ \dfrac{\partial \Gamma}{\partial z}=0 \end{cases} Where $\Gamma$ is the general equation of the ellipsoid, such that $\Gamma(x,y,z)=0$.

And finally, given the eigenvectors of $\mathbf{A}$, how can I derive the angles ($\phi,\theta,\psi$) I rotated the ellipsoid with?

Thanks in advance,

J.

1

There are 1 best solutions below

0
On

Match up the independent eigenvectors of the matrix, which will be the ellipsoid’s principal axes, with their respective eigenvalues. You can use the two-ouput form of Matlab’s eig function for this. If you normalize the eigenvectors and assemble them into a matrix, you will then have an orthogonal transformation that aligns the principal axes with the coordinate axes. For it to be a rotation, you’ll need to arrange the normalized eigenvectors so that the determinant of this matrix is $1$. Once you have this matrix, you can extract its Euler angles, if you need them, using standard methods such as described here.