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.
Ok, I managed to compute the polar radius for a general ellipsoid. Brace yourself, here it is*:
$$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
*Mathematica simplified