Last Updated February 11, 2009
The brute-force approach discussed above is very expensive and takes no advantage of temporal or spatial coherence.
An attractive method developed by Lin & Canny can compute collisions between polyhedra. The great thing about this method is that object complexity does not impact significantly on the speed of the algorithm.
Features of a polyhedron are vertices, edges and faces. Points in the space around a polyhedron can be classified according to which feature is closest. These groups of points are called voronoi regions. Voronoi regions can be calculated at build-time.
To determine which feature is closest to a given point, just figure out which voronoi region the point is in.
The Lin-Canny approach uses voronoi regions to determine which two features of two polyhedra are closest.
The goal of this algorithim is to find the closest points between two objects. A pair of points are closest if they are both in voronoi region of the other feature.
Given a pair of features there are 6 cases to consider;
Cases 5 & 6 will only occur when a edge or face is exactly parallel to a face, as this occurs extremely rarely we will not consider them.
The technique starts with an arbitrary pair of features (one on each polyhedron) and then find the closest points (pointa & pointb) between these features.
We must check if pointa is the closest point in polyhedron A to polyhedron B. (is pointa in the voronoi region of pointb's feature?)
We must check if pointb is the closest point in polyhedron B to polyhedron A.(is pointb in the voronoi region of pointa's feature?)
If either check fails, then find a new feature which is closer and recheck.
Eventually the closest points will be found.
The algorithm requires that the closest points between each pair of features be found;
For vertex to vertex, the closest points are the vertices themselves (trivial case)
For vertex to edge, the closest point is determined by finding the perpendicular distance to the edge's supporting line from the vertex. If this point lies outside the edge, end point closest to the point is used.
For vertex to face, the perpendicular distance to the supporting plane is found, if this point lies outside the face, then the face vertex closest is used.
If a vertex is the closest feature to a point, then the point must lie in the voronoi region of the vertex.
If the point lies inside the Voronoi region of the feature, the the feature is the nearest feature to that point, otherwise son eother feature is nearer.
The voronoi region of a vertex is the space enclosed by planes through the vertex at right angles to each of the vertex's edges. If a point lies 'outside' one of these planes then the edge associated with that plane is a closer feature to the point and the procedure selects the edge as a candidate closest feature.
If an edge is the closest feature on a polyhedron to a point, then the point must lie in the voronoi region of the edge.
The voronoi region of edge is the space enclosed by two planes through the edge at right angles to each of the edges faces. Planes at right angles to the edge through the endpoints complete the voronoi region. If a point lies 'outside' one of these planes then the face or vertex associated with that plane is a closer feature to the point and the procedure selects the face or vertex as a candidate closest feature.
If a face is the closest feature on a polyhedron to a point, then the point must lie in the voronoi region of the face.
The voronoi region of face is the space enclosed by the planes through the edges at right angles to the faces. If a point lies 'outside' one of these planes then edge with that plane is a closer feature to the point and the procedure selects the edge as a candidate closest feature.
© Ken Power 1996-2016