Sphere-Sphere intersection and Circle-Sphere intersection
Posted
by
cagirici
on Game Development
See other posts from Game Development
or by cagirici
Published on 2014-05-28T17:42:49Z
Indexed on
2014/05/29
4:04 UTC
Read the original article
Hit count: 390
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.
© Game Development or respective owner