590 likes | 601 Views
Simulate system of continuously moving objects and efficiently maintain discrete attributes such as closest pair of objects, convex hull, minimum spanning tree, binary space partition.
E N D
Mohammad Abam Mark de Berg Sheung-Hung Poon Bettina Speckmann Kinetic Collision Detectionfor Convex Fat Objects
Kinetic Data Structures • Simulate system of continuously moving objects. • Efficiently maintain discrete attributes of objects: • closest pair of objectst • convex hull • minimum spanning tree • binary space partition • ...
Dynamic data structures • Allow insertions and deletions of objects at discrete times. • Not suitable for handling moving objects.
Time sampling approach • Choose fixed time step. • Update the positions of moving objects at each time step. • Update the data structure with the new positions of objects.
t t Time sampling approach • How to choose the proper time step? • Oversampling • Undersampling
t Time sampling approach • Combinatorial changes occur in irregular patterns.
Kinetic Data Structures (Basch, Guibas, and Hershberger, 1998) • Use any static algorithm to compute the configuration function (i.e. the discrete attribute). • Turn the algorithm into a proof that this attribute is correct. • Animate this proof through time.
Example: convex hull Proof: a is to the left of bc d is to the left of bc b is to the right of ad c is to the left of ad c d a b c b d a a c d d b a b c
d Example: convex hull c a t1 CertificateFailure time a is to the left of bc d is to the left of bc b is to the right of ad c is to the left of ad t2 b never d is to the right of bc t1 t2 b is to the left of ad never
Kinetic Data Structures Structures • Proof of correctness of attribute (certificates) • Priority queue (event queue) Assumptions • A simple model for motion: each object follows a known flight plan with rational parameters. • Certificates are algebraic; failure is next largest root.
Kinetic Data Structures Efficient KDS exist for • 2d convex hull • Closest pair • Delaunay triangulation • Diameter, width of point sets • Collision detection between simple polygons in the plane, between two convex polyhedra in 3D, between multiple convex fat objects of similar sizes in 3D • …
Kinetic Data Structures Collision detection Set of geometric tests (elementary certificates) that certify that the input objects are disjoint.
Kinetic data structure properties • A KDS is called • compactif it uses little space in addition to the input. • responsive if the data structure invariants can be restored quickly after the failure of a certificate. • local if it can be updated easily if the flight plan for an object changes. • efficient if the worst-case number of events handled by the data structure is small compared to some worst case number of external events.
Related work • Same-size convex fat objects [Basch, Guibas, and Zhang, 1997] Compactness O(n log2 n) certificates Responsiveness each event can be handled in O(log3 n) time Efficiency O(n2) events in the worst case • Two convex polyhedra[Erickson, Guibas, Stolfi, and Zhang, 1999][Guibas, Xie, and Zhang, 2001]
Balls rolling on a plane Balls Bi with center ci and radius ri. Certificate of non-collision: dist(ci,cj) – ri – rj > 0 Bi Bj
Threshold disks Smallest blue ball with radius = rmin
Threshold disk of radius Threshold disks Bi
Non-collision certificates Lemma: Each point in the plane is contained in at most a constant number of threshold disks. The number of non-collision certificates is O(n).
Kinetic maintenance • Replace threshold disks by threshold boxes.
Kinetic maintenance • Replace threshold disks by threshold boxes. • Maintain two sorted lists on x- and y-coordinates of tangency points and threshold boxes. O(n) certificates.
Kinetic maintenance Lemma: Each point in the plane is contained in at most a constant number of threshold boxes. The number of non-collision certificates is O(n).
Kinetic data structure properties Balls rolling on a plane CompactnessO(n log n) certificates Responsivenesseach event can be handled in logarithmic time. EfficiencyO(n2) events in the worst case, assuming that the balls follow constant-degree algebraic trajectories.
Fat objects Definition: An object is called ρ-fat if ro/ri < ρ. ri ro
Convex fat constant-complexity objects free-flying in 3D Balls rolling on a plane: threshold disks of radius Balls free flying: threshold disks of radius ri + rmin
Guarding fat objects LemmaFor any ρ-fat object K, there is a set G(K) of O(ρ6)guarding points such that any ρ-fat object K’ that collides with K and is at least as large as K contains a point from G(K).
Guarding fat objects LemmaFor any ρ-fat object K, there is a set G(K) of O(ρ6)guarding points such that any ρ-fat object K’ that collides with K and is at least as large as K contains a point from G(K).
Guarding fat objects LemmaFor any ρ-fat object K, there is a set G(K) of O(ρ6)guarding points such that any ρ-fat object K’ that collides with K and is at least as large as K contains a point from G(K). Approach For each g ∈ G(K) maintain the object K(g) containing g SolutionReplace objects by their bounding boxes Problem: Hard to do efficiently
Bounding boxes A guard g can be contained in many bounding boxesbut only the smaller objects can actually contain g maintain the smallest k objects whose bounding box contains g
Making it work … • A guard g.
Making it work … • The unit cube centered at g.
Making it work … • A grid whose cells have edge length .O(ρ2) grid cells.