Finding the parameters of an ellipsoid given its quadratic form

4.3k Views Asked by At

Suppose we have the quadratic form of an ellipsoid of the form

$$ax^2 + by^2+cz^2+dxy+eyz+fxz+gx+hy+iz+j=0$$

I want to find centroid of the arbitrarily oriented ellipsoid, its semi-axes, and the angles of rotation.

For the 2D case I found an answer here. I was wondering if someone can help me do the same for 3D.

1

There are 1 best solutions below

4
On BEST ANSWER

The equation of an ellipsoid centered at the origin has the form $q_A(\mathbf{v}) = \mathbf{v}^T A \mathbf{v} = C$ where $C > 0$ and $A$ is a symmetric matrix whose eigenvalues are all positive. If the eigenvalues of $A$ are $\lambda_i$ with a corresponding orthonormal basis of eigenvectors $v_i$ (so $Av_i = \lambda_i v_i$) then the semi-principal axes of the ellipsoid are the $v_i$'s with lengths $\lambda_i$.

If the ellipsoid is centered at $\mathbf{p}$ instead of the origin, the equation describing it is

$$ q_A(\mathbf{v} - \mathbf{p}) = (\mathbf{v} - \mathbf{p})^T A (\mathbf{v} - \mathbf{p}) = \mathbf{v}^T A \mathbf{v} - 2 \mathbf{v}^T A \mathbf{p} + \mathbf{p}^T A \mathbf{p} = C.$$

Thus, the first part of the equation is quadratic in $\mathbf{v}$, the second part of the equation is linear in $\mathbf{v}$ and the third part is constant. To rewrite your equation in the form above, we set

$$ \mathbf{v} = \begin{pmatrix} x \\ y \\ z \end{pmatrix}, A = \begin{pmatrix} a & \frac{d}{2} & \frac{f}{2} \\ \frac{d}{2} & b & \frac{e}{2} \\ \frac{f}{2} & \frac{e}{2} & c\end{pmatrix}, \mathbf{p} = A^{-1} \begin{pmatrix} \frac{-g}{2} \\ \frac{-h}{2} \\ \frac{-i}{2} \end{pmatrix}, C = \mathbf{p}^T A \mathbf{p} - j.$$

If the eigenvalues of $A$ are all positive and $C > 0$, then your equation indeed describes an ellipsoid whose center is $\mathbf{p}$ and whose semi-principal axes are given by an orthonormal basis of eigenvectors of $A$ with lengths the corresponding eigenvalues.