Find a sphere tangent to four other

71 Views Asked by At

I am working in an algorithm to order a bed of close-packed spheres. In the case where I have got four spheres, I understand that the fifth sphere position and radius is determined by the positions and radii of the four other spheres. It seems that there would be different solutions: one that produces a sphere that is similar in size to the other four, and a second solution in which the four spheres are encompassed in a bigger sphere. What interests me is the first solution. Any ideas what equation system solves this? The input data for the systems would be the positions of the original four sphere centres and their respective radii, and the output would be the position and radius of the fifth sphere. It is also important to notice that the four original spheres can but do not need to be tangent between them. Thanks a lot in advance!