In [1]:
%matplotlib inline
In [2]:
import matplotlib.pyplot as plt
import numpy as np
Here, we follow the reasoning presented by Webster (1904) for analyzing the ellipsoidal coordinate $\lambda$ describing a prolate ellipsoid.
Let's consider an ellipsoid with semi-axes $a$, $b$, $c$ oriented along the $x$-, $y$-, and $z$-axis, respectively, where $a > b = c > 0$. This ellipsoid is defined by the following equation:
A quadric surface which is confocal with the ellipsoid defined in equation 1 can be described as follows:
where $\rho$ is a real number. We know that equation 2 represents an ellipsoid for $\rho$ satisfying the condition
Given $a$, $b$, and a $\rho$ satisfying equation 3, we may use equation 2 for determining a set of points $(x, y, z)$ lying on the surface of an ellipsoid confocal with that one defined in equation 1. Now, consider the problem of determining the ellipsoid which is confocal with that one defined in equation 1 and pass through a particular point $(x, y, z)$. This problem consists in determining the real number $\rho$ that, given $a$, $b$, $x$, $y$, and $z$, satisfies the equation 2.
By rearranging equation 2, we obtain the following quadratic equation for $\rho$:
This equation shows that:
By rearanging this equation, we obtain a simpler one given by:
where
and
Note that a particular $\rho$ satisfying equation 2 results in $f(\rho) = 0$ (equation 4).
In order to illustrate the parameter $\rho$, consider the constants $a$, $b$, $x$, $y$, and $z$ given in the cell below:
In [3]:
a = 20.
b = 13.
x = 21.
y = 23.
z = 30.
By using these constants, we calculate the coefficients $p_{2}$ (equation 5), $p_{1}$ (equation 6) and $p_{0}$ (equation 7) as follows:
In [4]:
p2 = 1.
p1 = a**2 + b**2 - (x**2) - (y**2) - (z**2)
p0 = (a*b)**2 - (b*x)**2 - (a*y)**2 - (a*z)**2
In the sequence, we define a set of values for the variable $\rho$ in an interval $\left[ \rho_{min} \, , \rho_{max} \right]$ and evaluate the quadratic equation $f(\rho)$ (equation 4).
In [5]:
rho_min = -a**2 - 100.
rho_max = -b**2 + 2000.
rho = np.linspace(rho_min, rho_max, 100)
In [6]:
f = p2*(rho**2) + p1*rho + p0
Finally, the cell below shows the quadratic equation $f(\rho)$ (equation 4) evaluated in the range $\left[ \rho_{min} \, , \rho_{max} \right]$ defined above.
In [7]:
ymin = np.min(f) - 0.1*(np.max(f) - np.min(f))
ymax = np.max(f) + 0.1*(np.max(f) - np.min(f))
plt.close('all')
plt.figure(figsize=(10,4))
plt.subplot(1,2,1)
plt.plot([rho_min, rho_max], [0., 0.], 'k-')
plt.plot([-a**2, -a**2], [ymin, ymax], 'r--', label = '$-a^{2}$')
plt.plot([-b**2, -b**2], [ymin, ymax], 'g--', label = '$-b^{2}$')
plt.plot(rho, f, 'k-', linewidth=2.)
plt.xlim(rho_min, rho_max)
plt.ylim(ymin, ymax)
plt.legend(loc = 'best')
plt.xlabel('$\\rho$', fontsize = 20)
plt.ylabel('$f(\\rho)$', fontsize = 20)
plt.subplot(1,2,2)
plt.plot([rho_min, rho_max], [0., 0.], 'k-')
plt.plot([-a**2, -a**2], [ymin, ymax], 'r--', label = '$-a^{2}$')
plt.plot([-b**2, -b**2], [ymin, ymax], 'g--', label = '$-b^{2}$')
plt.plot(rho, f, 'k-', linewidth=2.)
plt.xlim(rho_min, 0.)
plt.ylim(-0.5*10**6, 10**5)
plt.legend(loc = 'best')
plt.xlabel('$\\rho$', fontsize = 20)
#plt.ylabel('$f(\\rho)$', fontsize = 20)
plt.tight_layout()
plt.show()
Remember that we are interested in a $\rho$ satisfying equation 3. Consequently, according to the figures shown above, we are interested in the largest root $\lambda$ of the quadratic equation $f(\rho)$ (equation 4).
The largest root $\lambda$ of $f(\rho)$ (equation 4) is given by:
where
In [8]:
delta = p1**2 - 4.*p2*p0
In [9]:
lamb = (-p1 + np.sqrt(delta))/(2.*p2)
In [10]:
print 'lambda = %.5f' % lamb
By substituing $\lambda$ in equation 4, we can verify that it is a root of $f(\rho)$.
In [11]:
f_lamb = p2*(lamb**2) + p1*lamb + p0
In [12]:
print 'f(lambda) = %.5f' % f_lamb
In [ ]: