![Page 1: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/1.jpg)
A Fast Algorithm for Incremental Distance Calculation
Paper by Ming C. Ling and John F. Canny
Presented by Denise Jones
![Page 2: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/2.jpg)
Algorithm Concept
• A method for calculating the closest features on two convex polyhedra
• Algorithm is complete (will always find closest features between 2 polyhedra)
• Can be used for:– Collision detection– Motion planning– Distance between objects in 3-D space
![Page 3: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/3.jpg)
Algorithm Concept
• Apply applicability criteria to features (vertices, edges, faces) of each polyhedron
• Without any initialization, running time of the algorithm is linear for the number of vertices
• With initialization, running time is constant• Can detect collision
– Returns an error and features that have collided or intersected
![Page 4: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/4.jpg)
Efficiency
• Once the closest features are determined, these will change infrequently
• When a change does occur, the new closest features will usually be on a boundary of the previous closest features.
![Page 5: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/5.jpg)
Efficiency Exceptions
• Initial features are parallel and on opposite sides (only on initialization)
• Exceptions after initialization
Parallel faces
Before Rotation After Rotation
![Page 6: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/6.jpg)
Applicability Criterion: Point-Vertex
• Determine planes that are perpendicular to coboundary (edges) of the vertex
• Point must be contained within the boundary of these planes in order to be the closest point
• If outside one of the boundaries, indicates that edge is closer and will perform the test on that edge.
![Page 7: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/7.jpg)
Applicability Criterion: Point-Vertex
Voronoi Region
VertexPoint
![Page 8: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/8.jpg)
Applicability Criterion: Point-Edge
• Determine region created by planes perpendicular to the head and tail of the edge and perpendicular to the coboundaries (faces)
• Point must be contained within the boundary of these planes in order for edge to be the closest feature
• If outside one of the boundaries, indicates corresponding feature is closer and will “walk” to the next feature and apply the appropriate test.
![Page 9: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/9.jpg)
Applicability Criterion: Point-Edge
Point
Edge
Voronoi Space
![Page 10: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/10.jpg)
Applicability Criterion: Point-Face
• Determine planes that are perpendicular to each edge of the face
• Point must be contained within the applicability prism (region comprised of these planes and the edges of the face)
• If outside one of the boundaries, indicates that edge is closer and performs the test for the corresponding edge.
• If point lies below the face, two possibilities– Collision– Another feature is closer than face or any of edges
• Algorithm will return closest feature
![Page 11: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/11.jpg)
Applicability Criterion: Point-Face
Point
Face
Voronoi Space
![Page 12: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/12.jpg)
Algorithm Cases
• Vertex-Vertex
• Vertex-Edge
• Vertex-Face
• Edge-Edge
• Edge-Face
• Face-Face
![Page 13: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/13.jpg)
Algorithm Example
• Determine closest features on the following polyhedra
• Randomly choose 2 features
![Page 14: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/14.jpg)
Algorithm Example: Vertex-Vertex
• Both vertices must meet point-vertex applicability criteria
• If either fails, will return vertex and corresponding edge
![Page 15: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/15.jpg)
Algorithm Example: Vertex-Vertex
• Test fails
Voronoi Region
Vertex
Point
![Page 16: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/16.jpg)
Algorithm Example: Vertex-Edge
• Edge must meet point-edge criterion
• Vertex must meet point-vertex criterion for closest point on edge to vertex
• If either fails, will return new feature pair based on failed test
![Page 17: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/17.jpg)
Algorithm Example: Vertex-Edge
• Test fails
Point
Edge
Voronoi Space
Closest point to vertex on edge
![Page 18: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/18.jpg)
Algorithm Example: Vertex-Face
• Face must meet point-face criterion
• Vertex must meet point-vertex criterion for closest point on face to vertex
• If either fails, will return new feature pair based on failed test
![Page 19: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/19.jpg)
Algorithm Example: Vertex-Face
• Test passes for both criteria• As polyhedra continue along their trajectories, the
necessary tests are reapplied starting with the last one performed. Usually only one test will be required.
Vertex
Face
Voronoi Space
Closest point to vertex on face
![Page 20: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/20.jpg)
Motion Planning
• Discretization a factor in collision-avoidance.
Location 2
Location 1
![Page 21: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/21.jpg)
Conclusion
• Algorithm calculates closest features on 2 convex polyhedra
• Algorithm is relatively simple
• Algorithm is efficient – Runs in constant time once initialized– Runs linearly in proportion to number of
vertices when initializing
• Algorithm is complete
![Page 22: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/22.jpg)
Data Structures and Concavity• Polyhedron: faces, edges,
vertices, position, and orientation• Face: outward normal, distance
from origin, vertices, edges, and coboundary
• Edge: head, tail, right face, and left face
• Vertex: x, y, z, and coboundary• Polyhedron must be convex• A concave polyhedron must be
converted to multiple convex polyhedra– May effect efficiency (quadratic)
![Page 23: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/23.jpg)
Algorithm: Edge-Face
• Determine if they are parallel
• If parallel, they are closest features if both:– The edge passes through the applicability
prism created by the face– The normal of the face being evaluated is
between the normals of each face bounding the edge being evaluated
![Page 24: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/24.jpg)
Algorithm: Edge-Face
• If not parallel– One of the vertices of the edge is closer to the
face if it meets the point-face applicability criterion and the edge points into the face, and this pair is returned
– If this criterion is not met, the edge-edge component of the algorithm is applied to the edge bounding the face that is closest to the edge and the edge under examination.
![Page 25: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/25.jpg)
Algorithm: Edge-Face
Applicability Prism
Edge (Parallel to Face)
![Page 26: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/26.jpg)
Algorithm: Edge-Face
• Test Failure• Vertex closer to face
than edge
Edge (Not Parallel to Face)
![Page 27: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/27.jpg)
Algorithm: Edge-FaceTest Failure
• Test Failure• Edge closer to edge
than face
Edge (Not Parallel to Face)
![Page 28: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/28.jpg)
Algorithm: Edge-Edge
• Determine closest points on the edges
• Apply point-edge applicability criteria to each pair
• If either fails, will return new feature pair based on failed test
![Page 29: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/29.jpg)
Algorithm: Edge-Edge
Nearest Points
![Page 30: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/30.jpg)
Algorithm: Face-Face
• Determine if faces are parallel
• If parallel– Check to see if overlapping, if so, they are
closest features
• If not parallel or not overlapping– Return first face and nearest edge of second
face to first face
![Page 31: A Fast Algorithm for Incremental Distance Calculation](https://reader035.vdocuments.us/reader035/viewer/2022062422/5681307e550346895d96592b/html5/thumbnails/31.jpg)
Algorithm: Face-Face
Parallel Faces