[Math] the spherical parametrization of an ellipsoid NOT centered in the origin

3dgeometryquadratics

I would like to know how to parametrize an ellipsoid not centered in the origin, but with its axes parallel to the main axes of the reference system.

The result I am looking for would be an expression of the distance of a point on the surface from the origin, given the azimuth and elevation (or any possible two angles of a spherical coordinate system).

I have found on wikipedia a similar formula for an ellipse. The given formula accounts also for rotation, which I don't necessarily need.

Best Answer

The parametrization for an ellipsoid is

$$\begin{align} x & = a \rho \sin(\theta) \sin(\varphi), \\ y & = b \rho \cos(\theta) \sin(\varphi), \\ z & = c \rho \cos(\varphi). \end{align}$$

To translate it parallel to the axes simply add $(x_0,y_0,z_0)$:

$$\begin{align} x & = x_0 + a \rho \sin(\theta) \sin(\varphi), \\ y & = y_0 + b \rho \cos(\theta) \sin(\varphi), \\ z & = z_0 + c \rho \cos(\varphi). \end{align}$$

We have

$$\frac{(x-x_0)^2}{a^2} + \frac{(y-y_0)^2}{b^2} + \frac{(z-z_0)^2}{c^2} = 1.$$

Related Question