Alex Rivera | Logout

Finding intersection points between 3 spheres

Asked 2009-09-10T16:36:48.240
15

I'm looking for an algorithm to find the common intersection points between 3 spheres.

Baring a complete algorithm, a thorough/detailed description of the math would be greatly helpful.

This is the only helpful resource I have found so far: http://mathforum.org/library/drmath/view/63138.html

But neither method described there is detailed enough for me to write an algorithm on.

I would prefer the purely algebraic method described in the second post, but what ever works.

Edit
Report

1 Answer

10

Probably easier than constructing 3D circles, because working mainly on lines and planes:

For each pair of spheres, get the equation of the plane containing their intersection circle, by subtracting the spheres equations (each of the form X^2+Y^2+Z^2+aX+bY+c*Z+d=0). Then you will have three planes P12 P23 P31.

These planes have a common line L, perpendicular to the plane Q by the three centers of the spheres. The two points you are looking for are on this line. The middle of the points is the intersection H between L and Q.

To implement this:

  • compute the equations of P12 P23 P32 (difference of sphere equations)
  • compute the equation of Q (solve a linear system, or compute a cross product)
  • compute the coordinates of point H intersection of these four planes. (solve a linear system)
  • get the normal vector U to Q from its equation (normalize a vector)
  • compute the distance t between H and a solution X: t^2=R1^2-HC1^2, (C1,R1) are center and radius of the first sphere.
  • solutions are H+tU and H-tU

alt text

A Cabri 3D construction showing the various planes and line L

answered 2009-09-10T17:12:34.160

Your Answer