Originariamente inviato da bako
infiniti..
Hi Rob,

The intersection of two spheres is a circle, and if you throw in a
third sphere you'll often find two points as the intersection of all
three.

Cramer's Rule won't work because it applies to linear systems, not
quadratic.

You can subtract equation 1 from eq 2, finding a linear relation in
x,y, and z. Do the same for eq 1 and eq 3. Solve the linear system of
two equations for x and y in terms of z. Substitute these results in
any of the equations of the spheres. This will give an equation in
terms of z alone. It will be quadratic. Solve it for z. Generate the
corresponding x and y by going back to the linear system.

For x1 = y1 = z1 = 0; r1 = 3; x2 = 1; y2 = 1; z2 = 1; r2 = 2;
x3 = -1; y3 = 1; z3 = 2; r3 = 2

I found the linear system to be

-8 + 2 x + 2 y + 2 z = 0

-11 - 2 x + 2 y + 4 z = 0

and solving this for x and y,

x = (1/4)*(-3 + 2*z), y = (1/4)*(19 - 6*z)

Substituting into the first sphere equation, I found

z = (1/14)*(30 - Sqrt[109]), z = (1/14)*(30 + Sqrt[109]) <----