The shortest distance between two points on a sphere

11.8k Views Asked by At

The shortest distance between two points $P_{1}(x_1,y_1,z_1)$ and $P_{2}(x_2,y_2,z_2)$ is given by

$d=\sqrt{(x_1-x_2)^2+(y_1-y_2)^2+(z_1-z_2)^2}$.


If both $P_1$ and $P_2$ lie on the sphere $(x-x_0)^2+(y-x_0)^2+(z-z_0)^2=r^2$, then what is the length of the shortest path between the two points such that the path lies on the surface of the sphere?


The formula for distance written above will not work to solve this problem.


How to express the length of the shortest path that lies on the sphere in terms of $x_0,y_0,z_0,x_1,y_1,z_1,x_2,y_2,z_2,$ and $r$?


I think the arc length using integration is the right way, but I am struggling with it. Any help will be appreciated.

2

There are 2 best solutions below

2
On BEST ANSWER

Consider a unit circle centered at $O = (0,0,0)$ with two points $A$ and $B$ on it. If the arc length between $A$ and $B$ is $\alpha$ (which is equal to the angle between $OA$ and $OB$), then the chord length $d$ satisfies

$$\frac{d}{2} = \sin\left(\frac{\alpha}{2}\right).$$

To find the surface distance between two points $A = (x_1, y_1, z_1)$ and $B = (x_2, y_2, z_2)$ on the unit sphere, note that the shortest path on the sphere between $A$ and $B$ is a great circle arc. By the previous observation, we find that the spherical distance is $$\alpha = 2\sin^{-1}\frac{d}{2} = 2\sin^{-1}\frac{\sqrt{(x_1-x_2)^2 + (y_1-y_2)^2 + (z_1-z_2)^2}}{2}.$$

Generalizing this to spheres of radius $r$, we get

$$\alpha = 2r\sin^{-1}\frac{d}{2r} = 2r\sin^{-1}\frac{\sqrt{(x_1-x_2)^2 + (y_1-y_2)^2 + (z_1-z_2)^2}}{2r}.$$

Alternatively, we can use the dot product of vectors, using the fact that for any two vectors $a$ and $b$ with an angle of $\gamma$, we have $a\cdot b = \|a\|\cdot\|b\|\cdot\cos\gamma$. If we let $a = A - O$ and $b = B - O$, we get two unit vectors with an angle of $\alpha$, so we get

$$\alpha = \cos^{-1}(a\cdot b) = \cos^{-1}(x_1x_2 + y_1y_2 + z_1z_2).$$

For arbitrary spheres of radius $r$ centered at $(x_0, y_0, z_0)$, we can reduce everything to the $r=1$ case by scaling and translating, and we get

$$\alpha = r\cos^{-1}\left(\frac{(x_1-x_0)(x_2-x_0)+(y_1-y_0)(y_2-y_0)+(z_1-z_0)(z_2-z_0)}{r^2}\right).$$

3
On

In spherical coordinates you have: $$x=\rho\cos(\theta)\cos(\phi)$$ $$y=\rho\cos(\theta)\sin(\phi)$$ $$z=\rho\sin(\theta)$$ So, using inverse formula you can find $P_1(\rho_1,\phi_1,\theta_1)$,$P_2(\rho_2,\phi_2,\theta_2)$

The minimum path between two points $P_1(x_1,y_1,z_1)$, $P_2(x_2,y_2,z_2)$ is given by: $$d(P_1,P_2)=\rho\arccos(\cos\Delta\phi\cos(\theta_{P_1})\cos(\theta_{P_2})+\sin(\theta_{P_1})\sin(\theta_{P_2})$$ where: $\Delta\phi=\phi_{P_2}-\phi_{P_1}$