Originally posted by DFrey:
Ysaneya  “find the closest point of the triangle to the center of the sphere” doesn’t sound exactly like a trivial issue either. I would start by testing the sphere against the triangle’s plane. That is a single number (the distance to the closest point in the plane) that can be easily found. If that value is within the radius then there may be an intersection, if not then there can not be an intersection. It appears (stress appears since I just woke up ) there are two cases left to check for, and fortunately they are easy. One test is to see if the closest point in the plane lies within the triangle. If it does then there must be an intersection. The other test is to see if any edge of the triangle intersects the sphere. I think that covers all the possibilities.
One case left, methinks… What if the triangle completely contains the sphere?
Like such:



 o
____\
Thats the harder case and I’m not exactly sure how to figure that one out. We know the sphere intersects the triangle’s plane, all the triangle’s points are outside the sphere’s radius, and none of the edges intersect the sphere.
[This message has been edited by BwB (edited 12302000).]