UNC Chapel Hill M. C. Lin References Collision Detection between Geometric Models: A Survey, by M. Lin and S. Gottschalk, Proc. of IMA Conference on Mathematics.

Slides:



Advertisements
Similar presentations
The Gilbert-Johnson-Keerthi (GJK) Algorithm
Advertisements

Complete Motion Planning
Motion Planning for Point Robots CS 659 Kris Hauser.
Intersection Testing Chapter 13 Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology.
Chapter 4.2 Collision Detection and Resolution. 2 Collision Detection Complicated for two reasons 1. Geometry is typically very complex, potentially requiring.
Motion Planning CS 6160, Spring 2010 By Gene Peterson 5/4/2010.
Closest Point Transform: The Characteristics/Scan Conversion Algorithm Sean Mauch Caltech April, 2003.
Convex Hulls in 3-space Jason C. Yang.
Continuous Collision Detection: Progress and Challenges Gino van den Bergen dtecta
Introduction to Collision Detection & Fundamental Geometric Concepts Ming C. Lin Department of Computer Science University of North Carolina at Chapel.
Advanced Computer Graphics Spring 2014
Week 14 - Monday.  What did we talk about last time?  Bounding volume/bounding volume intersections.
A Fast Algorithm for Incremental Distance Calculation Paper by Ming C. Ling and John F. Canny Presented by Denise Jones.
Intersections. Intersection Problem 3 Intersection Detection: Given two geometric objects, do they intersect? Intersection detection (test) is frequently.
Visibility Computations: Finding the Shortest Route for Motion Planning COMP Presentation Eric D. Baker Tuesday 1 December 1998.
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics1 Basic 3D collision detection We want to know if objects have touched Objects are considered to.
Robert Pless, CS 546: Computational Geometry Lecture #3 Last Time: Convex Hulls Today: Plane Sweep Algorithms, Segment Intersection, + (Element Uniqueness,
Fast Penetration Depth Computation for Physically-based Animation Y. Kim, M. Otaduy, M. Lin and D.
Chapter 4.2 Collision Detection and Resolution. 2 Collision Detection Complicated for two reasons 1. Geometry is typically very complex, potentially requiring.
UNC at CHAPEL HILL & Ewha Womans University Generalized Penetration Depth Computation Liang-Jun Zhang Gokul Varadhan Dinesh Manocha Dept of Computer Sci.
1 Geometry A line in 3D space is represented by  S is a point on the line, and V is the direction along which the line runs  Any point P on the line.
Adapted from: CULLIDE: Interactive Collision Detection Between Complex Models in Large Environments using Graphics Hardware Naga K. Govindaraju, Stephane.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Continuous Collision Detection David Knott COMP 259 class presentation.
CS 326 A: Motion Planning robotics.stanford.edu/~latombe/cs326/2004/index.htm Collision Detection and Distance Computation.
OBBTree: A Hierarchical Structure for Rapid Interference Detection Gottschalk, M. C. Lin and D. ManochaM. C. LinD. Manocha Department of Computer Science,
UNC Chapel Hill M. C. Lin Overview of Last Lecture About Final Course Project –presentation, demo, write-up More geometric data structures –Binary Space.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Constraint-Based Motion Planning using Voronoi Diagrams Maxim Garber and Ming C. Lin Department of Computer.
Efficient Distance Computation between Non-Convex Objects By Sean Quinlan Presented by Sean Augenstein and Nicolas Lee.
CS 326A: Motion Planning ai.stanford.edu/~latombe/cs326/2007/index.htm Collision Detection and Distance Computation.
CS 326A: Motion Planning ai.stanford.edu/~latombe/cs326/2007/index.htm Collision Detection and Distance Computation.
Collision Detection David Johnson Cs6360 – Virtual Reality.
Simulation of Robotic Systems Particle Dynamics, Rigid Body Dynamics, Collision Detection.
Computer graphics & visualization Collision Detection – Narrow Phase.
12/4/2001CS 638, Fall 2001 Today Using separating planes/axes for collision testing Collision detection packages.
UNC Chapel Hill M. C. Lin Point Location Chapter 6 of the Textbook –Review –Algorithm Analysis –Dealing with Degeneracies.
INTERACTION TECHNIQUES Collision Detection and Other Interactions Collision Detection and Other Interactions.
Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
UNC Chapel Hill M. C. Lin Point Location Reading: Chapter 6 of the Textbook Driving Applications –Knowing Where You Are in GIS Related Applications –Triangulation.
CSE 381 – Advanced Game Programming Quickhull and GJK.
CSE 381 – Advanced Game Programming GJK. GJK Gilbert – Johnson – Keerthi distance algorithm Used to determine the minimum distance between convex sets.
Contact Manifolds Erin Catto Blizzard Entertainment.
Collision handling: detection and response
UNC Chapel Hill M. C. Lin Linear Programming Reading: Chapter 4 of the Textbook Driving Applications –Casting/Metal Molding –Collision Detection Randomized.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Collisions & Contact.
1 Shortest Paths in Three Dimensions Speaker: Atlas F. Cook IV Advisor: Carola Wenk.
12/4/2001CS 638, Fall 2001 Today Managing large numbers of objects Some special cases.
PRESENTED BY – GAURANGI TILAK SHASHANK AGARWAL Collision Detection.
TEL-AVIV UNIVERSITY RAYMOND AND BEVERLY SACKLER FACULTY OF EXACT SCIENCES SCHOOL OF MATHEMATICAL SCIENCES An Algorithm for the Computation of the Metric.
Collision and Proximity Queries Dinesh Manocha Department of Computer Science University of North Carolina
CIS 350 – I Game Programming Instructor: Rolf Lakaemper.
UNC Chapel Hill M. C. Lin Introduction to Motion Planning Applications Overview of the Problem Basics – Planning for Point Robot –Visibility Graphs –Roadmap.
1 / 41 Convex Hulls in 3-space Jason C. Yang. 2 / 41 Problem Statement Given P: set of n points in 3-space Return: –Convex hull of P: CH (P) –Smallest.
A Fast Algorithm for Incremental Distance Calculation Ming C. Lin and John F. Canny University of California, Berkeley 1991 Original slides by Adit Koolwal.
UNC Chapel Hill M. C. Lin Randomized Linear Programming For any set of H of half-planes, there is a good order to treat them. Thus, we can improve the.
Interactive Continuous Collision Detection for Polygon Soups Xin Huang 11/20/2007.
A Fast Algorithm for Incremental Distance Calculation Ming C. Lin & John Canny University of California, Berkeley 1991 Presentation by Adit Koolwal.
GJK Supplement Reference: SIGGRAPH2004 Course Note Original Reference: A Fast Procedure for Computing the Distance between Objects in Three-Dimensional.
Minkowski Sums and Distance Computation Eric Larsen COMP
Collision Detection Spring 2004.
VORONOI DIAGRAMS FOR PARALLEL HALFLINES IN 3D
Parts of these slides are based on
References Additional lecture notes for 2/18/02.
Chapter 4.2 Collision Detection and Resolution
Craig Schroeder October 26, 2004
Young J. Kim Ming C. Lin Dinesh Manocha
References Collision Detection between Geometric Models: A Survey, by M. Lin and S. Gottschalk, Proc. of IMA Conference on Mathematics of Surfaces 1998.
INTERACTION TECHNIQUES
Kinetic Collision Detection for Convex Fat Objects
Computer Animation Algorithms and Techniques
Collision Detection.
Presentation transcript:

UNC Chapel Hill M. C. Lin References Collision Detection between Geometric Models: A Survey, by M. Lin and S. Gottschalk, Proc. of IMA Conference on Mathematics of Surfaces Collision Detection between Geometric Models: A Survey I-COLLIDE: Interactive and Exact Collision Detection for Large- Scale Environments, by Cohen, Lin, Manocha & Ponamgi, Proc. of ACM Symposium on Interactive 3D Graphics, (More details in Chapter 3 of M. Lin's Thesis) A Fast Procedure for Computing the Distance between Objects in Three-Dimensional Space, by E. G. Gilbert, D. W. Johnson, and S. S. Keerthi, In IEEE Transaction of Robotics and Automation, Vol. RA-4: , 1988.

UNC Chapel Hill M. C. Lin Geometric Proximity Queries Given two object, how would you check: –If they intersect with each other while moving? –If they do not interpenetrate each other, how far are they apart? –If they overlap, how much is the amount of penetration

UNC Chapel Hill M. C. Lin Collision Detection Update configurations w/ TXF matrices Check for edge-edge intersection in 2D (Check for edge-face intersection in 3D) Check every point of A inside of B & every point of B inside of A Check for pair-wise edge-edge intersections Imagine larger input size: N = ……

UNC Chapel Hill M. C. Lin Classes of Objects & Problems 2D vs. 3D Convex vs. Non-Convex Polygonal vs. Non-Polygonal Open surfaces vs. Closed volumes Geometric vs. Volumetric Rigid vs. Non-rigid (deformable/flexible) Pairwise vs. Multiple (N-Body) CSG vs. B-Rep Static vs. Dynamic And so on… This may include other geometric representation schemata, etc.

UNC Chapel Hill M. C. Lin Some Possible Approaches Geometric methods Algebraic Techniques Hierarchical Bounding Volumes Spatial Partitioning Others (e.g. optimization)

UNC Chapel Hill M. C. Lin Voronoi Diagrams Given a set S of n points in R 2, for each point p i in S, there is the set of points (x, y) in the plane that are closer to p i than any other point in S, called Voronoi polygons. The collection of n Voronoi polygons given the n points in the set S is the "Voronoi diagram", Vor(S), of the point set S. Intuition: To partition the plane into regions, each of these is the set of points that are closer to a point p i in S than any other. The partition is based on the set of closest points, e.g. bisectors that have 2 or 3 closest points.

UNC Chapel Hill M. C. Lin Generalized Voronoi Diagrams The extension of the Voronoi diagram to higher dimensional features (such as edges and facets, instead of points); i.e. the set of points closest to a feature, e.g. that of a polyhedron. FACTS: –In general, the generalized Voronoi diagram has quadratic surface boundaries in it. –If the polyhedron is convex, then its generalized Voronoi diagram has planar boundaries.

UNC Chapel Hill M. C. Lin Voronoi Regions A Voronoi region associated with a feature is a set of points that are closer to that feature than any other. FACTS: –The Voronoi regions form a partition of space outside of the polyhedron according to the closest feature. –The collection of Voronoi regions of each polyhedron is the generalized Voronoi diagram of the polyhedron. –The generalized Voronoi diagram of a convex polyhedron has linear size and consists of polyhedral regions. And, all Voronoi regions are convex.

UNC Chapel Hill M. C. Lin Voronoi Marching Basic Ideas: Coherence: local geometry does not change much, when computations repetitively performed over successive small time intervals Locality: to "track" the pair of closest features between 2 moving convex polygons(polyhedra) w/ Voronoi regions Performance: expected constant running time, independent of the geometric complexity

UNC Chapel Hill M. C. Lin Simple 2D Example Objects A & B and their Voronoi regions: P1 and P2 are the pair of closest points between A and B. Note P1 and P2 lie within the Voronoi regions of each other.

UNC Chapel Hill M. C. Lin Basic Idea for Voronoi Marching

UNC Chapel Hill M. C. Lin Linear Programming In general, a d-dimensional linear program-ming (or linear optimization) problem may be posed as follows: Given a finite set A in R d For each a in A, a constant K a in R, c in R d Find x in R d which minimize Subject to  K a, for all a in A. where is standard inner product in R d.

UNC Chapel Hill M. C. Lin LP for Collision Detection Given two finite sets A, B in R d For each a in A and b in B, Find x in R d which minimize whatever Subject to > 0, for all a in A And < 0, for all b in B where d = 2 (or 3).

UNC Chapel Hill M. C. Lin Minkowski Sums/Differences Minkowski Sum (A, B) = { a + b | a  A, b  B } Minkowski Diff (A, B) = { a - b | a  A, b  B } A and B collide iff Minkowski Difference(A,B) contains the point 0.

UNC Chapel Hill M. C. Lin Some Minkowski Differences AB A B

UNC Chapel Hill M. C. Lin Minkowski Difference & Translation Minkowski-Diff(Trans(A, t 1 ), Trans(B, t 2 )) = Trans(Minkowski-Diff(A,B), t 1 - t 2 )  Trans(A, t 1 ) and Trans(B, t 2 ) intersect iff Minkowski-Diff(A,B) contains point (t 2 - t 1 ).

UNC Chapel Hill M. C. Lin Properties Distance –distance(A,B) = min a  A, b  B || a - b || 2 –distance(A,B) = min c  Minkowski-Diff(A,B) || c || 2 –if A and B disjoint, c is a point on boundary of Minkowski difference Penetration Depth –pd(A,B) = min{ || t || 2 | A  Translated(B,t) =  } –pd(A,B) = min t  Minkowski-Diff(A,B) || t || 2 –if A and B intersect, t is a point on boundary of Minkowski difference

UNC Chapel Hill M. C. Lin Practicality Expensive to compute boundary of Minkowski difference: –For convex polyhedra, Minkowski difference may take O(n 2 ) –For general polyhedra, no known algorithm of complexity less than O(n 6 ) is known

UNC Chapel Hill M. C. Lin GJK for Computing Distance between Convex Polyhedra GJK-DistanceToOrigin ( P ) // dimension is m 1. Initialize P 0 with m+1 or fewer points. 2. k = 0 3. while (TRUE) { 4. if origin is within CH( P k ), return 0 5. else { 6. find x  CH(P k ) closest to origin, and S k  P k s.t. x  CH(S k ) 7. see if any point p -x in P more extremal in direction -x 8. if no such point is found, return |x| 9. else { 10. P k+1 = S k  {p -x } 11. k = k } 13. } 14. }

UNC Chapel Hill M. C. Lin An Example of GJK

UNC Chapel Hill M. C. Lin Running Time of GJK Each iteration of the while loop requires O(n) time. O(n) iterations possible. The authors claimed between 3 to 6 iterations on average for any problem size, making this “expected” linear. Trivial O(n) algorithms exist if we are given the boundary representation of a convex object, but GJK will work on point sets - computes CH lazily.

UNC Chapel Hill M. C. Lin More on GJK Given A = CH(A’) A’ = { a 1, a 2,..., a n } and B = CH(B’) B’ = { b 1, b 2,..., b m } Minkowski-Diff(A,B) = CH(P), P = {a - b | a  A’, b  B’} Can compute points of P on demand: –p -x = a -x - b x where a -x is the point of A’ extremal in direction -x, and b x is the point of B’ extremal in direction x. The loop body would take O(n + m) time, producing the “expected” linear performance overall.

UNC Chapel Hill M. C. Lin Large, Dynamic Environments For dynamic simulation where the velocity and acceleration of all objects are known at each step, use the scheduling scheme (implemented as heap) to prioritize “critical events” to be processed. Each object pair is tagged with the estimated time to next collision. Then, each pair of objects is processed accordingly. The heap is updated when a collision occurs.

UNC Chapel Hill M. C. Lin Scheduling Scheme a max : an upper bound on relative acceleration between any two points on any pair of objects. a lin : relative absolute linear  : relative rotational accelerations  : relative rotational velocities r: vector difference btw CoM of two bodies d: initial separation for two given objects a max = | a lin +  x r +  x  x r | v i = | v lin +  x r | Estimated Time to collision: t c = { (v i a max d) 1/2 - v i } / a max

UNC Chapel Hill M. C. Lin Collide System Architecture Analysis & Response Sweep & Prune Simulation Exact Collision Detection Collision Transform Overlap Parameters

UNC Chapel Hill M. C. Lin Sweep and Prune Compute the axis-aligned bounding box (fixed vs. dynamic) for each object Dimension Reduction by projecting boxes onto each x, y, z - axis Sort the endpoints and find overlapping intervals Possible collision -- only if projected intervals overlap in all 3 dimensions

UNC Chapel Hill M. C. Lin Sweep & Prune b1b1 b2b2 e1e1 e2e2 b3b3 e3e3 b1b1 b2b2 e1e1 b3b3 e2e2 e3e3 T = 1 b1b1 b2b2 e1e1 e2e2 b3b3 e3e3 b3b3 b1b1 e3e3 b2b2 e1e1 e2e2 T = 2

UNC Chapel Hill M. C. Lin Updating Bounding Boxes Coherence (greedy algorithm) Convexity properties (geometric properties of convex polytopes) Nearly constant time, if the motion is relatively “small”

UNC Chapel Hill M. C. Lin Use of Sorting Methods Initial sort -- quick sort runs in O(m log m) just as in any ordinary situation Updating -- insertion sort runs in O(m) due to coherence. We sort an almost sorted list from last stimulation step. In fact, we look for “swap” of positions in all 3 dimension.

UNC Chapel Hill M. C. Lin Implementation Issues Collision matrix -- basically adjacency matrix Enlarge bounding volumes with some tolerance threshold Quick start polyhedral collision test -- using bucket sort & look-up table