1 / 59

Static & Dynamic Maintenance of Kinematic Structures

Static & Dynamic Maintenance of Kinematic Structures. Spheres, Molecules, and Hidden Surface Removal D. Halperin and M-H. Overmars Dynamic Maintenance of Kinematic Structures D. Halperin, J-C. Latombe and R. Motwani. Presented by Iftah Gamzu. Agenda. Static case: Hard Sphere Model

Download Presentation

Static & Dynamic Maintenance of Kinematic Structures

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Static & Dynamic Maintenance of Kinematic Structures Spheres, Molecules, and Hidden Surface Removal D. Halperin and M-H. Overmars Dynamic Maintenance of Kinematic Structures D. Halperin, J-C. Latombe and R. Motwani Presented by Iftah Gamzu

  2. Agenda • Static case: • Hard Sphere Model • Molecules Special Properties • Data Structures for Answering Intersection Queries • Computing the Boundary of a Molecule • Dynamic case: • Graph Theoretic Definition • Abstract Data Structure for Answering Intersection Queries • Online Maintenance Case for Path / Trees • Offline Maintenance Case • Background for future lectures(if time allows): • Hidden Surface Removal (Static Case)

  3. Static Case • Goal: devise techniques to represent and manipulate a static collection of overlapping spheres in . • Motivation: molecular biology • representation of molecular configurations (e.g. union boundary of a molecule). • manipulation of molecular configurations (e.g. collision detection).

  4. Hard Sphere Model • Each atom in the molecule is represented as a sphere in • Spheres can interpenetrate one another • There are recommendedvalues for: • Radios of each sphere (e.g. van der Waals radii) • Distance between centers of each pair of spheres Acetyl

  5. Molecule Special Properties Generally, spheres in might be complex combinatorially - arrangement defined by n spheres in might have complexity of • However, molecules have special properties: • Atoms centers cannot get too close to one another (repellent forces) • Atoms radii range is fairly restricted

  6. Main Theorem - Definitions

  7. Main Theorem

  8. Main Theorem - Proof • Every ball in M that intersectsmust lie completely in B • For each that lies completely inside B, let • are pair-wise interior-disjoint

  9. Main Theorem - Proof By volume considerations, the total number of balls that are completely contained in B cannot exceed…  (i) is proved.

  10. Main Theorem - Proof Immediately follows from (i) since the number of features involving on the union boundary is bounded by the number of balls intersecting it, which is a constant (O(1)) .  The complexity of the union boundary of M is O(n)

  11. Main Theorem - Example max and aver. indicate the maximal and average number of balls intersecting a single ball in each molecule.

  12. Intersection Queries • Goal: devise a data structure that can answer intersection queries with either a point or with a ball whose radius is bounded by . • Motivation:molecular biology - computer aided drug design. • checking whether molecules fit together. • checking whether a particular position in lie inside or outside the molecule.

  13. Intersection Queries – Solution 1 Preprocessing: Store C (the set of centers of the balls in M) in a three dimensional range tree suitable for answering: Given a query axis-parallel box, report the points in C contained in this box.

  14. Intersection Queries – Solution 1 Query: • Given a query ball Q (with radius ), construct a ball Q’ with radius and concentric with Q. • B’ is the axis-parallel bounding box of Q’. • Query the range search structure on C with the box B’.

  15. Intersection Queries – Solution 1 • For each of the answers, check whether the corresponding ball intersects Q. Performance:

  16. Intersection Queries – Solution 2 Preprocessing: • Subdividespace into cubes whose side is long. • For each ball in M compute the grid cubes that it intersects (at most 8 cubes). • Arrange C (the set of non-empty grid cubes) in a balanced binary search tree and attach to each cube a list (of constant number) of balls in M that intersect it.

  17. Intersection Queries – Solution 2 Query: • Given a query ball Q, compute the grid cubes it intersects (at most 8 cubes). • For each grid cube, find it in the binary search tree and (if it exists) check the balls in its list for intersection with Q. Performance:

  18. Intersection Queries – Solution 3 Use hash structure instead of the binary search tree. Performance:

  19. Intersection Queries – Solution 3 Testing Results: density of the molecule is more dominant then the size of the molecule.

  20. Computing Boundary • Goal: devise an algorithm to compute the boundary of a collection of interpenetrating spheres. • Motivation:molecular biology • computing van der Waals surface. • computing the approximate solvent accessible surface. • other surfaces…

  21. Computing Boundary – cont. The algorithm also solves the problem of computing the approximate solvent accessible surface. • Reduction: • New instance with different constants ( ) on which we need to compute the union boundary. Increase the radius of each ball in M by r` (the radius of the solvent sphere).

  22. Computing Boundary – Solution Algorithm Outline: For each ball identify the other balls intersecting it. Use the intersection query data structure. For each ball compute its contribution to the union boundary. • Each pair of intersecting balls (which none contains the other) defines a circle that partitions each ball into two parts. • For each ball, calculate all the circles on it (a 2D arrangement on the ball) and decide which faces are on the boundary (using brute force).

  23. Computing Boundary – Solution Transform the local information into global structures describing the union boundary. • We start with a face (f) that must be on the boundary (e.g. the face that has the largest z-coordinate on its boundary). • Recursively, traverse the neighboring faces (f `) of (f) that haven’t been visited yet.

  24. Computing Boundary – Solution Performance: Preprocessing time + Queries time

  25. Computing Boundary – Solution Testing Results: SOD Notice: although steps 1 and 2 theoretically take O(n), step 2 dominates the amount of time required (larger constant).

  26. Dynamic Case • Goal: devise a data structure that allows us to answer intersection queries on a moving collection of bodies connected by joints in . • Motivation: • conformational search in molecular biology. • collision detection. • simulation of hyper-redundant robots.

  27. Dynamic Case – cont. • Concept: • Assumption: we know how to solve the problem for the static case – e.g. if the collection represents a molecule then we can use the previously discussed hash structure. • Goal: we would like to devise a data structure that will maintain a collection of static substructures and will be able to (efficiently) support dynamic operations (e.g. update of the joint parameter).

  28. Dynamic Case – cont. • Example 1: • for each link there is a substructure (e.g. hash structure representing a grid occupancy by a link). • (joint parameter) update operation  update the coordinate system transformation (O(1)). • query operation  each substructure must be queried (O(n)).

  29. Dynamic Case – cont. • Example 2: • Suppose we knew that the sequence of update and query operations would have the special feature that all the update operations modify the same joint. What would be a decent strategy ?

  30. Graph Theoretic Problem Definition • Input:L – articulated linkage of n links with no closed loops. • A treeT(V, E) such that • Links map to vertices - • Joints map to edges - joint connecting links i and j

  31. Graph Theoretic Problem Definition • Output:D – a dynamic collection of substructures that supports two operations: • - change joint (edge) parameter to q. • - query some region for intersections. • Notes: • the substructures in D can be viewed as a decomposition of T(into sub-trees)induced by the removal of a set of edges in E (marked asBROKEN). • each substructure represents the space occupied by L-elements corresponding to a sub-tree of T.

  32. Graph Theoretic Problem Definition • Example: • T is decomposed into 2 sub-trees (i.e. D is made of 2 substructures). • Each sub-tree’s corresponding L-elements are maintained in a substructure that represents the space occupied by them.

  33. The Abstract Data Structure • Primitive operations: • - breaks the edge (this results in a partition of the substructure that held into two substructures). Cost: O(1) if the edge is already BROKEN. if the edge is MARGED. • - merges the edge (this results in a union of the corresponding substructures). Cost: O(1) if the edge is already MARGED. if the edge is BROKEN.

  34. The Abstract Data Structure – cont. is: • The TOTAL cost measure corresponds to a situation where each operation destroys the old structure(s) and then re-computes new structure(s) from sketch • The MIN cost measure corresponds to a situation where new structure(s) can be re-computed by inserting/deleting of elements.

  35. The Abstract Data Structure – cont. • How QUERY is performed ? • For simplicity, assume that T is a serial linkage. • Let denote the static structure that holds the link , be the next static structure along the path and so on. • Each static structure has a coordinate frame attached to it in which the links in this structure are described ( has the universal frame).

  36. The Abstract Data Structure – cont. • For every pair of successive static structures and we maintain a rigid transformation which transforms points described in the frame of to the frame of . • Given a query region Q, we query with Q. The we query with Q’ = (Q)… and so on.

  37. T Online Case for Path Initial state:BROKEN edges are spaced regularly along the path at intervals of . Operations: • - as explained. • - • Update the q parameter in it (and the transformation). • (if not one of the initially BROKEN edges).

  38. Online Case for Path – cont. Time complexity: QUERY – O( ) – since there are substructures UPDATE – O( ) – for the TOTAL and MIN cost measure.  NO  can we do better ?

  39. Online Case for Path – Lower Bound Adversary Approach: • If the number of BROKEN edges exceeds , it request a query operation (takes ). • Else (the number of BROKEN edges is fewer then ) , then there exists a sub path with more then vertices and the adversary inputs operation which involves breaking the middle most edge in this sub path (takes for both TOTAL and MIN cost measures).  NO  can we gain more strength using randomization?

  40. Online Case for Trees – MIN cost Example (T is a star): • For the TOTAL cost measure, it is impossible to find a small number of edges that will decompose the star into small sub-trees  for each operation. • For the MIN cost measure, do not break any edge  for each operation.

  41. Online Case for Trees – MIN cost Definitions: • Heaviness of an edge • Heaviness of a tree • Balance number κ of a tree – the smallest integer κ such that the removal of κ-1 edges decomposes it to κ sub-trees, none of which is κ-heavy. Note: κ-heavy  κ’-heavy κ’κ

  42. Online Case for Trees – MIN cost Assume that there is a tree T with balance number κ: Initial state: the BROKEN edges are the set of (at most κ-1) edges which gives a κ-balanced decomposition. Operations: the same as for the path case. Time complexity:O(κ) per operation.  YES  is this bound tight ?

  43. Online Case for Trees – MIN cost How to find a balanced decomposition of T ? Principles: • κ is known – if κ is unknown, a binary search for its value can be performed at the cost of increasing the running time by a factor of O(log(n)). • The algorithm: • Based on DFS, thus takes O(n) time. • Invariant:on final return to vertex u, the residual sub-tree rooted at u does not contain any κ-heavy edges.

  44. If this residual sub-tree has > κ-1 vertices it must be cut. Must cut one of the edges Can’t be a κ-heavy edge If each of the sub-trees rooted at u’s children have at most κ - 1 vertices then the sub-tree rooted at u does not contain any κ-heavy edges. If r (r > 1) of u’s children have in their sub-trees more then κ - 1 vertices then (at least) r - 1 of them must be cut. If one of u’s children has in its sub-tree more then κ - 1 vertices then the decision whether to cut it depends on the remainder of the sub-tree under u. > κ-1  κ-1  κ-1 > κ-1  κ-1 > κ-1 Can’t be any κ-heavy edges Online Case for Trees – MIN cost

  45. Online Case for Trees – MIN cost DecomposeAlgorithm

  46. Online Case for Trees – MIN cost DecomposeAlgorithm

  47. 2 1 3 3 m=3 / d=1 3 d=1 d=3 d=1 Online Case for Trees – MIN cost DecomposeAlgorithm Example 6 7 5 1 4 7 4 1 4 7 1 1 1 1 1 1 1 1 1 1 1 1 1 4 3 Tree with balance number 4 1 1

  48. Online Case for Trees – MIN cost Conclusion: Algorithm DFS-Decompose runs in O(n) on an input tree T with n nodes, and for any given integer κ, it returns a κ-balanced decomposition of T if it has balance number κ, and returns failure otherwise.

  49. Online Case for Trees – TOTAL cost The idea:“breaking a vertex” Add another primitive that breaks a vertex: • replace a vertex v by two copies of itself and , with an edge between them. • each edge incident to v is assigned to one of its copies.  There exist a choice of O( ) vertices to break such that the tree is decomposes into O( ) sub-trees, each of size O( ).

  50. Offline Case for Path – TOTAL cost The TOTAL problem is NPC • - ordered sequence of queries. • - ordered sequence of vertices in the path. • update operations translate into grid points . operation between queries and

More Related