# Is there any way to compute a tangent plane between three spheres?

Thank you! Hello,

yes, there is a way. I'm new to OpenCASCADE, so I don't know if there OCC way, but there definitely is a mathematical way.

First solve the same problem for 2D. Draw two different size circles, connect their centers, make a tangent line and draw radii (from center to tangent line). extend the center and tangent line so they'll intersect. Sign radii 'R' and 'r', distance of centers 'd' and distances from center to the intersection point 'A' and 'a'. From this picture you'll see:

A = a + d
a : A = r : R

a / (a + d) = r / R

a = d * (r / (R - r))

alpha = asin (r / a)

solving the last two equations you get the angle of radii to the tangent point. Draw secon tangent line (there are allways two of them) and connect the tangent points.

Now think in 3D again. The last line you have drawn comes to be a circle drawn on your sphere. You know the center of it, its radius and normal vector (same for the second ball). Every line connecting relevant points on these circles is tangent line of the two balls.

Do it again for the rest two combinations of spheres and you get two circles on each sphere. now the crosspoints of the circles give you two point on each sphere. These are two solutions of tangent plane of these three balls.

Sorry for my english, but is it clear enough?
p.