7
$\begingroup$

I am a Computer Science undergraduate who does a lot of other tinkering in his free time. Right now, I'm tinkering with n-spheres. Specifically, I'm looking at the distances between a collection of points on n-sphere surfaces. Euclidean distances are trivial (but in this particular application still interesting). I would like to look at "great-circle" distances between points on an n-sphere, but unfortunately I am not familiar with Riemannian Geometry or anything of the sort.

How can one go about calculating the distance between two points on an n-sphere? Can you make this digestible for an undergraduate student who is unfamiliar with the literature?

$\endgroup$

1 Answer 1

9
$\begingroup$

The two-dimensional formula applies (why?): the great-circle distance is $\cos^{-1}(\vec u\cdot \vec v)$ where $\vec u$ and $\vec v$ are position vectors of the points.

$\endgroup$
5
  • 2
    $\begingroup$ To add to Kovalev's response, given two points on the n-sphere, generically they span a plane (unless the points are antipodal and the distance is $\pi$, or identical and the distance is $0$). In a plane the distance is given by Kovalev's formula, and that's the proof. $\endgroup$ Commented Jan 1, 2010 at 3:14
  • $\begingroup$ Just in case it matters, the above is assuming a sphere of radius 1. Multiply the answer by the radius to adjust for different sized spheres. $\endgroup$ Commented Jan 1, 2010 at 4:44
  • 1
    $\begingroup$ Brilliant. Googling didn't give me a generalized equation. Thank you MO and thank you Kovalev, Budney and DeVito. $\endgroup$ Commented Jan 1, 2010 at 5:23
  • $\begingroup$ Can I have the same formula in spherical coordinates? Thanks! $\endgroup$
    – user86387
    Commented Feb 8, 2016 at 13:49
  • $\begingroup$ @F. Cuevas: convert it to rectangular coordinates (that formula is not hard) and apply the formula above. $\endgroup$ Commented Feb 8, 2016 at 19:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .