The equation for the circle defined by two intersecting spheres in 3-space?

1.3k Views Asked by At

We define two spheres, $S_1$ and $S_2$, of radius $r_1$ and $r_2$, centered at 3-space points $p_1$ and $p_2$, respectively. What equation gives the circle in 3-space at the intersection between the two spheres?

In other words the following circle:

enter image description here

My goal is to pick a point uniformly from the contour of this circle.

1

There are 1 best solutions below

0
On

You can use the 2D case to compute this: take one circle of radius $r_1$ centered at the origin, and a second circle of radius $r_2$ centered at $(d, 0)$. Then you get two points of intersection (computed using Wolfram Alpha):

$$\left(\frac{d^2+r_1^2-r_2^2}{2d}, \pm\sqrt{r_1^2-\frac{(d^2+r_1^2-r_2^2)^2}{4d^2}}\right)$$

In your 3D setup, you set $d$ to the distance between the two centers of the spheres:

$$p_1 = (x_1, y_1, z_1)$$

$$p_2 = (x_2, y_2, z_2)$$

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

Then do the above computation.

  • The first coordinate of the result represents the distance of center $p_i$ of the circle of intersection from the point $p_1$ in the direction of $p_2$
  • The second coordinate, choosen positively, represents the radius $r_i$ of the circle of intersection.

enter image description here