Sphere between two surfaces, through point

In Grasshopper there is a function CircleTanTan which creates a circle tangent to two curves through a point.

I’m looking for the 3D equivalent - of a sphere touching two surfaces and a selected point.

Has anyone got any leads for me for such a function?

Cheers

DK

This requires some sort of an optimization and I think it could be solved with Kangaroo.

I’m using EleFront to reference and bake a sphere center point. Every time a sphere center point is baked and the solver reset, the solution should get more accurate and the distance outputs of the Brep CP component should converge.

sphere_tan_tan.3dm (163.3 KB)
sphere_tan_tan.gh (25.4 KB)

One thing to be aware of is that, unlike CircleTanTan, there can be infinite solutions to any combination of two surfaces and a single point because you are introducing the additional dimension.

For example, with these two surfaces and a point at the origin:

you can find solution radii that permit a single sphere, such as the red and purple ones here, or even two spheres, such as the aquamarine pair:

Regards
Jeremy

1 Like