a fast algorithm for incremental distance calculation paper by ming c. ling and john f. canny...

31
A Fast Algorithm for Incremental Distance Calculation Paper by Ming C. Ling and John F. Canny Presented by Denise Jones

Upload: hortense-nichols

Post on 18-Dec-2015

222 views

Category:

Documents


1 download

TRANSCRIPT

A Fast Algorithm for Incremental Distance Calculation

Paper by Ming C. Ling and John F. Canny

Presented by Denise Jones

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

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

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.

Efficiency Exceptions

• Initial features are parallel and on opposite sides (only on initialization)

• Exceptions after initialization

Parallel faces

Before Rotation After Rotation

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.

Applicability Criterion: Point-Vertex

Voronoi Region

VertexPoint

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.

Applicability Criterion: Point-Edge

Point

Edge

Voronoi Space

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

Applicability Criterion: Point-Face

Point

Face

Voronoi Space

Algorithm Cases

• Vertex-Vertex

• Vertex-Edge

• Vertex-Face

• Edge-Edge

• Edge-Face

• Face-Face

Algorithm Example

• Determine closest features on the following polyhedra

• Randomly choose 2 features

Algorithm Example: Vertex-Vertex

• Both vertices must meet point-vertex applicability criteria

• If either fails, will return vertex and corresponding edge

Algorithm Example: Vertex-Vertex

• Test fails

Voronoi Region

Vertex

Point

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

Algorithm Example: Vertex-Edge

• Test fails

Point

Edge

Voronoi Space

Closest point to vertex on edge

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

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

Motion Planning

• Discretization a factor in collision-avoidance.

Location 2

Location 1

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

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)

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

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.

Algorithm: Edge-Face

Applicability Prism

Edge (Parallel to Face)

Algorithm: Edge-Face

• Test Failure• Vertex closer to face

than edge

Edge (Not Parallel to Face)

Algorithm: Edge-FaceTest Failure

• Test Failure• Edge closer to edge

than face

Edge (Not Parallel to Face)

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

Algorithm: Edge-Edge

Nearest Points

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

Algorithm: Face-Face

Parallel Faces