It is possible to construct a system of equations that defines all spheres that touch two smooth surfaces.

This includes all the spheres inscribed between these surfaces. The first two equations are surfaces,  x7, x8, x9 are the coordinates of the centers of the spheres, the remaining variables correspond to the coordinates of the points of contact. 
In the program, we inscribe a sphere between a cylinder and a sphere. An example of obtaining one of the infinite subsets of the solution to a system of equations is implemented. This solution is "responsible" for the equation f8.
INSCRIBED_SPHERES_CILL_FOR.mw

And one more example.


Please Wait...