# Polar radius of a general ellipsoid

Is there a proper parametrization of a general ellipsoid in spherical coordinates?

The regular parametrization is this: $$x=a\cdot \cos\phi \cos\theta\\y=b\cdot \cos\phi \sin \theta\\z=c\cdot \sin\phi.$$ What one can do is extract the polar radius via: $$x=r\cdot \cos\phi \cos\theta\\y=r\cdot \cos\phi \sin \theta\\z=r\cdot \sin\phi,$$ plug these equations into the standard ellipsoid equation and solve for $r$. Thus, $$r(\phi,\theta)=\frac{a\cdot b\cdot c}{\sqrt{ b^2 c^2 \cos^2(\theta) \cos^2(\phi) + a^2 (c^2 \cos^2(\phi) \sin^2(\theta) + b^2 \sin^2(\phi))}} .$$

What I'm looking for, is an expression for the polar radius, just as the one above, but which takes into account the three possible rotations of the ellipsoid (via Euler or Tait-Bryan anles); i.e. a function $r_{\alpha,\beta, \gamma}(\phi,\theta)$ which fulfills $x=r_{\alpha,\beta, \gamma}\cdot \cos\phi \cos\theta,y=r_{\alpha,\beta, \gamma}\cdot \cos\phi \sin \theta,z=r_{\alpha,\beta, \gamma}\cdot \sin\phi$ simultaneously and describes the surface of an ellipsoid.

• This should be possible, right, because rotating the ellipsoid around (0,0,0) does not destroy the consistency of the polar radius? – ZappaZ Dec 8 '15 at 13:48
• You can find the transformed equation after rotation and derive from that the radius as you did above. By the way: the angles appearing in what you call "regular parametrization" are NOT the same as polar angles appearing in the other formulas. – Aretino Dec 8 '15 at 22:11

As Aretino suggests, you can take the implicit representation for the ellipsoid $$E = \left\{ x \in \mathbb{R}^3 : \frac{x_1^2}{a^2} + \frac{x_2^2}{b^2} + \frac{x_3^2}{c^2} = 1 \right\}$$ and apply the rotation to it before you derive your expression for $r (\phi, \theta)$. This you can easily do by observing that the equation above is actually $$x^{\top} Q x = 1$$ for a quadratic form $\mathcal{Q}$ with matrix $Q = \left(\begin{array}{ccc} a^2 & & \\ & b^2 & \\ & & c^2 \end{array}\right)$. After a rotation $R$, where $R$ is an orthogonal matrix (in particular $R^{- 1} = R^{\top}$) your ellipsoid is \begin{eqnarray*} E & = & \{ y \in \mathbb{R}^3 : (R^{- 1} y)^{\top} Q (R^{- 1} y) = 1 \}\\ & = & \{ y \in \mathbb{R}^3 : y^{\top} \tilde{Q} y = 1 \}, \end{eqnarray*} where $\tilde{Q} = RQR^{\top}$. Now you can try to proceed as you did in the first place to derive the expression for $r (\phi, \theta)$.
$$r_{\alpha,\beta,\gamma} = \frac{a\cdot b\cdot c}{\sqrt{(b^2 c^2 Sin(\beta)^2 Sin(\phi)^2 + a^2 c^2 Cos(\phi)^2 Sec(\gamma)^2 Sin(\theta - \ \alpha)^2 + a^2 b^2 Cos(\phi)^2 Sin(\theta - \alpha)^2 Sin(\ \gamma)^2 + Cos(\theta)^2 Cos(\phi)^2 Sec(\alpha)^2 (b^2 c^2 \ Cos(\beta)^2 Cos(\alpha)^4 + a^2 Sin(\beta)^2 (b^2 Cos(\gamma)^2 + c^2 Sin(\gamma)^2)) + Cos(\beta)^2 (a^2 b^2 Cos(\gamma)^2 Sin(\phi)^2 + c^2 (b^2 Cos(\phi)^2 Sin(\theta)^2 Sin(\alpha)^2 \ + a^2 Sin(\phi)^2 Sin(\gamma)^2)) - a^2 b^2 Cos(\phi)^2 Sin(\beta) Sin(\theta - \ \alpha)^2 Sin(2 \gamma) Tan(\alpha) + a^2 b^2 Cos(\phi)^2 Cos(\gamma)^2 Sin(\beta)^2 \ Sin(\theta - \alpha)^2 Tan(\alpha)^2 + a^2 c^2 Cos(\phi)^2 Sin(\beta)^2 Sin(\theta - \ \alpha)^2 Sin(\gamma)^2 Tan(\alpha)^2 + Cos(\beta) (-2 b^2 Cos(\phi) Sin(\phi) (c^2 \ Sin(\theta) Sin(\beta) Sin(\alpha) + a^2 Cos(\gamma) Sin(\theta - \alpha) Sin(\gamma)) + a^2 Sin(2 \phi) Sin(\theta - \alpha) (b^2 Cos(\ \gamma)^2 Sin(\beta) Tan(\alpha) + c^2 Sin(\gamma) (Cos(\gamma) + Sin(\beta) Sin(\gamma) Tan(\alpha)))) + Cos(\theta) Cos(\phi) Sec(\alpha) (-2 b^2 c^2 Cos(\ \beta) Cos(\alpha)^2 Sin(\beta) Sin(\ \phi) + 2 b^2 c^2 Cos(\beta)^2 Cos(\phi) Cos(\ \alpha)^2 Sin(\theta) Sin(\alpha) + a^2 (c^2 Sin(2 \beta) Sin(\phi) Sin(\gamma)^2 + b^2 Cos(\gamma)^2 (Sin(2 \beta) Sin(\phi) + 2 Cos(\phi) Sin(\beta)^2 Sin(\theta - \ \alpha) Tan(\alpha)) + Cos(\phi) Sin(\beta) Sin(\theta - \ \alpha) (-b^2 Sin(2 \gamma) + 2 c^2 Sin(\gamma) (Cos(\gamma) + Sin(\beta) Sin(\gamma) Tan(\alpha))))) \ + 2 a^2 c^2 Cos(\phi)^2 Sin(\beta) Sin(\theta - \ \alpha)^2 Tan(\alpha) Tan(\gamma) - 2 a^2 c^2 Cos(\phi)^2 Sin(\beta) Sin(\theta - \ \alpha)^2 Sin(\gamma)^2 Tan(\alpha) Tan(\gamma) - 2 a^2 c^2 Cos(\phi)^2 Sin(\theta - \alpha)^2 Tan(\ \gamma)^2 + a^2 c^2 Cos(\phi)^2 Sin(\theta - \alpha)^2 Sin(\ \gamma)^2 Tan(\gamma)^2)}}$$
$\gamma$, $\beta$ and $\alpha$ rotate the ellipsoid around the x, y and z axis