Sphere-Sphere intersection and Circle-Sphere intersection
- by cagirici
I have code for circle-circle intersection. But I need to expand it to 3-D.
How do I calculate:
Radius and center of the intersection circle of two spheres
Points of the intersection of a sphere and a circle?
Given two spheres (sc0,sr0) and (sc1,sr1), I need to calculate a circle of intersection whose center is ci and whose radius is ri.
Moreover, given a sphere (sc0,sr0) and a circle (cc0, cr0), I need to calulate the two intersection points (pi0, pi1)
I have checked this link and this link, but I could not understand the logic behind them and how to code them.
I tried ProGAL library for sphere-sphere-sphere intersection, but the resulting coordinates are rounded. I need precise results.