|
|
Given a sphere |X - C|^2 = r^2 we want to find the minimum distance of the sphere to the triangle X = P + s * E0 + t * E1 with s, t in [0, 1] and s + t <= 1. The minimum distance point occurs either inside the triangle or on one of the three line segments that define the triangle's edges. Therefore, we simply have to compute the minimum distances to the triangle plane and the three triangle edges and use the minimum of these distances as the minimum distance between the triangle and the sphere.
|
Copyright © by Martin Ecker |