1 / 25

Computational Geometry

Computational Geometry. Piyush Kumar (Lecture 10: Point Location). Welcome to CIS5930. Planar Point Location. Given a polygonal subdivision of the plane (a PSLG) , Preprocess to answer which face a query point lies in. Assume Input has n vertices. Step 1. Triangulate. Step 2.

tasha
Download Presentation

Computational Geometry

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. Computational Geometry Piyush Kumar (Lecture 10: Point Location) Welcome to CIS5930

  2. Planar Point Location • Given a polygonal subdivision of the plane (a PSLG) , Preprocess to answer which face a query point lies in. Assume Input has n vertices.

  3. Step 1 • Triangulate

  4. Step 2 • Put the input in a large triangle and triangulate.

  5. Timing • How much time did you spend yet? • Any ideas on how to locate a given point in such a subdivision? • Notice that each face is a triangle now, including the face containing the point at infinity.

  6. By the way • Kirkpatrick’s subdivision hierarchy method for performing point location in planar graphs is also applicable • In higher dimensions • Amenable to parallelization • Uses? Many, Collision detection in 3D? • Beware: The algorithm has large constants.

  7. Subdivision Hierarchy • Start with triangulated PSLG T0 • Produce a sequence of triangulations T0, T1, T2, … Tk where k=O(log n) such that • Tk contains a single triangle • Each triangle in Ti+1 overlaps only a constant number of triangles in Ti.

  8. Subdivision hierarchy T5 T0 Courtesy Goodrich,Ramaiyer.

  9. Search Structure: Layered DAG T3 T0

  10. Observations • The degree of each node is O(1) • A fraction of the nodes are removed at each step. Hence the total depth of the DAG is O(log n).

  11. Obsevation 1 • Constant degree Observation • When we delete a node with degree d, there is a hole of size d vertices which we can re-triangulate (with d-2 triangles). Each of the new triangles can overlap only d triangles in the previous triangulation. Trivial Example:

  12. Observation 2 • Independent Set : No two vertices that are deleted are adjacent to each other (the vertices to be deleted form an independent set in the current graph Ti. • White nodes are the one to be deleted next.

  13. Observation 2 • Independent set removal: Is easy. These vertices create independent holes that can be triangulated independently of each other. Note that the size of these holes is O(1). Maximum size hole created in this example is 4.

  14. Independent set • We need to make sure that we have large independent set of vertices with bounded (O(1)) degree in a triangulated planar graph. • We want to remove a fraction of the vertices at each step. Hence the total number of layers in the DAG will be O(log n).

  15. Kirkpatrick’s Method • Find a maximal independent set in the PSLG such that the degree of the vertices is bounded by O(1). • Remove vertices of the independent set from the PSLG and re-triangulate (the holes) • Repeat the process until only the outer face remains. Maximal Ind. Set : A set of independent vertices of a graph G such that no new vertex can be added to this set keeping the independence property

  16. John Iacono’s Demo

  17. Search for Maximal independent set • Lemma: Given a planar graph with n vertices, there is an independent set consisting of vertices of degree at most 8, with at least n/18 vertices. This independent set can be constructed in O(n) time. See page 106 of Dr. Mount’s Lecture notes

  18. Average degree of a vertex

  19. Average degree of a vertex Hence, average degree of a vertex < 6.

  20. At least n/2 vertices of degree <= 8 • Proof by contradiction : • Let there be more than n/2 vertices of degree 9 or greater. The other vertices must have degree > 3 (Assuming n > 3). • Hence average degree now would be ( 9n/2 + 3n/2 ) / n = 6. • This is a contradiction since average degree should be < 6.

  21. Search Algorithm for Maximal independent set • Mark all nodes with degree >= 9 • Note: At least n/2 unmarked nodes. • While there exists an unmarked node • Choose unmarked vertex v • Add v to independent set • Mark v and all its neighbors. • Note: At most 9 vertices marked. (n/2)/9 = n/18 How many times can we run this loop before we run out of unmarked vertices?

  22. Search Algorithm for Maximal independent set • Note that in each iteration of the loop we add one vertex in our independent set. So we get at least a n/18 size independent set with degree of vertices <= 8 in it. (Proves our main lemma). • Why does this run in O(n) time?

  23. Height of the DAG? • At each successive level, the number of vertices falls by a factor of (17/18)n. • Hence the total height of the DAG is • k = log18/17n = O(log n) • What about total space taken by the data structure? • O(n) Why? In each level you reduce the size of the data by a constant fraction

  24. Size of the data structure • Size proportional to total number of triangles • Number of triangles in each layer proportional to the number of vertices. • Sum of number of vertices

  25. Summary • Space required by DAG = O(n) • Query Time: O(log n) • Preprocessing time: O(n)

More Related