Page 1 of 1

Contact or intersection between 2 spheres

Posted: Mon Aug 27, 2012 6:57 am
by elodie
I want to know if 2 spheres have a contract or an intersection. The difficulty is that both can be :
- scaled on 3 axes (X,Y,Z)
- positionned in 3d (vector 3d) and rotated in 3d (euler or quaternion)

1) Does that problem relate to another (eg. there is a formula to go from scaled spheres to ellipsoid ?)
2) Any hints ?

Re: Contact or intersection between 2 spheres

Posted: Thu Aug 30, 2012 10:20 am
by totenkoph
If the final shape is ellipsoid, maybe the GJK algorithm based SAT(separate-axis-test) can help to find if two ellipsoids are intersect or not (but no contact points if intersect). But, not sure is the fastest one.

David Eberly gave some good solutions, as http://www.geometrictools.com/Documenta ... psoids.pdf.