E. Geometric interpretation
An ellipsoid can be described by its general equation:
Ax2 + By2 + Cz2 + 2Dxy + 2Exz + 2Fyz + 2Gx + 2Hy + 2Iz + J = 0
In matrix form:
If we define
then the center of the ellipsoid can be calculated as the vector b= - Q-1 u
The ellipsoid's semi-axis a, b and c are given by:
where : λ1, λ2 and λ3 are the eigenvalues of Q.
The corresponding normalized eigenvectors v1, v2 and v3 of the matrix Q describe the direction of the 3 principal axis of the ellipsoid. And the matrix V formed from the column vectors v1, v2 and v3 is the rotation matrix that describes the orientation of the ellipsoid in the reference frame.
Mapping a general ellipsoid to a sphere of radius R centered at (0,0)
This will be done in 5 steps:
Step 1. Translate the ellipsoid so that its center coincides with the origin(0,0)
Step 2. Align the principal axis of the ellipsoid with the x, y and z-axis of the reference frame
Step 3. Scale the principal axis of the ellipsoid so that they all have the same length (becoming a sphere)
Step 4. Rotate back the sphere to the original orientation of the ellipsoid
Step 5. Scale the sphere to a norm R
For any point x (x,y,z) at the surface of the ellipsoid:
Step 1 : The center of the ellipsoid is transfered to the origin (0,0) of the reference frame. The point x becomes x1.
Step 4 : the sphere is rotated back to the original orientation of the ellipsoid by the rotation matrix V. The point x3 becomes x4.
Step 3 : The semi-axis b and c are scaled to the length of the semi-axis a, transforming the ellipsoid into a sphere of radius a. The point x2 becomes x3.
Step 2 : The principal axis of the ellipsoid are aligned with the x, y and z-axis of the reference frame. This corresponds to applying an inverse rotation to that described by V, that is VT or V-1 as the inverse and transpose of a rotation matrix are the same. The point x1 becomes x2.
Step 5 : the radius of the sphere is changed from a to R. The point x4 becomes xmap.
Summing it all (Step 1 to 5) :