Tetrahedron vs Sphere (yes, another specific collision detection problem)

Started by
4 comments, last by John Schultz 18 years, 8 months ago
I need to check the intersection of a tetrahedron (ie. four point 3d object) and a sphere. It needs to be very fast and I don't think what I've come up with so far is going to cut it: For each face: Get the closest point on the plane. If the sphere is above the plane, return false. If the sphere intersects plane, and the point is within the face, return true. Otherwise, continue. Also record whether the sphere intersects the plane or not, so that if we find that it doesn't intersect any of the planes, we can return true immediately (completely within tetra) Now, I think this is great except for the case where the sphere intersects one of the corners/edges... And I don't want to try getting the distance to all six edges as a final check. Maybe I'll have to... Can anyone think of a better idea? I'd check www.magic-software.com but it doesn't appear to exist anymore :( PS: Know any good alternatives to magic-software? Thanks [Edited by - averisk on August 6, 2005 1:30:07 AM]
Advertisement
http://www.geometrictools.com/

[Edited by - John Schultz on August 6, 2005 2:44:56 AM]
Great link, thanks
Though it only includes tetrahedron/tetrahedron collision, unfortunately
Check if the sphere is inside all the planes, if true, is intersecting, return.
Find the distance to each triangle, store the nearest distance found (or distance^2), check against sphere center and radius (or radius^2). The Geometric Tools site has a triangle distance example.

A Voronoi region method could also be used (see Wm3DistVector3Frustum3.cpp).

Another triangle-distance method is shown in Real-time Collision Detection.
That will do :)

rating++
Voronoi, GJK, continuous, etc., with source and demos here (register to login to access examples, files. Forum access does not require login).

This topic is closed to new replies.

Advertisement