Here is a possible solution that fits these two additional conditions:
Let the equation of the ellipsoid be defined as:
$$ \frac{x^2}{a^2} + \frac{y^2}{b^2} + \frac{z^2}{c^2} = 1 $$
Any point on the surface is defined as:
$$ \vec p_p = ( x_p, y_p, z_p ) $$
The two points in question are where $p=1$ and $p=2$.
A normal vector to the surface at any point is:
$$ \vec n_p = ( \frac{x_p}{a^2}, \frac{y_p}{a^b}, \frac{z_p}{c^2} ) $$
In order for the sphere to contain both points, its center must lay on the plane that is the perpendicular bisector of the two points. This halfway plane contains the midpoint of the two points and its normal is the difference of the two points.
$$ \vec m = \frac{ \vec p_1 + \vec p_2 }{2} $$
$$ \vec d = \vec p_1 - \vec p_2 $$
Let $ \vec h $ be any point on the plane.
$$ ( \vec h - \vec m ) \cdot \vec d = 0 $$
$$ \vec h \cdot \vec d = \vec m \cdot \vec d $$
Any line normal to the surface at point $p$ can be parameterized as:
$$ \vec g_p(t_p) = t_p \vec n_p + \vec p_p $$
The value of $t_p$ where the line intersects the halfway plane at point $ \vec q_p $ can be found:
$$ \vec q_p \cdot \vec d = ( t_p^* \vec n_p + \vec p_p ) \cdot \vec d = \vec m \cdot \vec d $$
$$ t_p^* = \frac{\vec m \cdot \vec d - \vec p_p \cdot \vec d}{\vec n_p \cdot \vec d } $$
$$ \vec q_p = t_p^* \vec n_p + \vec p_p $$
Each of the normal lines from the two points will intersect the halfway plane. For simplicity, define the center of the sphere $ \vec s $ at the midpoint of these two points.
$$ \vec s = \frac{ \vec q_1 + \vec q_2 }{2} = ( x_s, y_s, z_s ) $$
The radius is then:
$$ r = \| \vec p_1 - \vec s \| = \| \vec p_2 - \vec s \| $$
And the equation for the approximating sphere is:
$$ ( x - x_s )^2 + ( y - y_s )^2 + ( z - z_s )^2 = r^2 $$
Notice that this approach does not do any kind of fit function between the ellipsoid surface and the approximating sphere surface. If such a function were defined, it could be evaluated for spheres with centers on the halfway plane in the neighborhood of $ \vec q_1 $ amd $ \vec q_2 $. Allowing the center to move off the plane relaxes the constraint the sphere needs to contain both points.
To find your geodesic points, warp the line segment between the points to fit on the surface of the sphere.
$$ \vec v = ( t \vec d + \vec m ) - \vec s $$
$$ \vec w = r \frac{\vec v}{\|\vec v\|} + \vec s $$
Where $t$ goes from -1/2 to 1/2.
A better geodesic can probably be found by shifting the center of the sphere according to $t$, and adjusting the radius correspondingly, along the line segment:
$$ \vec s(t) = t ( \vec q_2 - \vec q_1 ) + ( \vec q_1 + \vec q_2 ) / 2 $$
I'll have to think about that. Of course, warping the line segment to fit on the ellipsoid surface would be even better.
Hope this helps.
Ced
P.S. A little post posting searching found these:
The points are 3D vectors
– Makogan Apr 29 '18 at 00:02