1 / 22

An Improved Algorithm for Reconstructing a Simple Polygon from the Visibility Angles

An Improved Algorithm for Reconstructing a Simple Polygon from the Visibility Angles. Danny Z. Chen and Haitao Wang University of Notre Dame Indiana, USA. Visibility Angles. Consider a simple polygon P: For vertex v, four visibility angles around v. a 3. a 2. a 4. a 1. v.

brendonm
Download Presentation

An Improved Algorithm for Reconstructing a Simple Polygon from the Visibility Angles

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. An Improved Algorithm for Reconstructing a Simple Polygon from the Visibility Angles Danny Z. Chen and Haitao Wang University of Notre Dame Indiana, USA

  2. Visibility Angles • Consider a simple polygon P: For vertex v, four visibility angles around v a3 a2 a4 a1 v

  3. The Visibility Graph of P Connect all pairs of visible vertices

  4. Visibility Angles for Every Vertex

  5. What is the Problem? • The cyclically ordered vertex list is given v6 v4 v7 v5 v2 v1 v3 The vertex list: v1, v2, v3, v4, v5, v6, v7

  6. What is the Problem? • All visibility angles are given v6 v4 v7 v5 v2 v1 v3

  7. What is the Problem? • Input: • A cyclically ordered vertex list of P • Visibility angles around every vertex of P • Goal: • Reconstruct the simple polygon P (up to similarity)

  8. Previous Work and Our Result • Disser, Mihalak, and Widmayer [SWAT 2010]: • The polygon P can be uniquely determined, up to similarity. • An O(n3log n) time algorithm for reconstructing P is given. • Our result: • An O(n2) time algorithm for reconstructing P • Worst case optimal • Based on new geometric observations

  9. What is the Difficulty for the Reconstruction? • Every vertex v sees some vertices, but cannot identify them, i.e., their vertex labels are not known to v. v6 v4 v7 v5 v2 v1 v3

  10. The Reconstruction Algorithm • Construct the visibility graph G • The key part • Reconstructing P from G • Generally, a long-standing open problem (in PSPACE), • but easy in our setting (O(n2) time) with • angle data information • the ordered vertex list of P

  11. Constructing the Visibility Graph G • For every two vertices vi and vj, determine whether they are visible to each other • An observation: vi is visible to vj if and only if there exists a vertex v in the red part such that Δvivjv does not intersect P\{vi,vj,v} vj vj v v vi vi

  12. vj v vi An Observation (cont.) • vi’: The last visible vertex to vj in the blue part counterclockwise • vj’: The first visible vertex to vi in the blue part counterclockwise vj vj’ triangle witness vi’ v vj’ vi’ vi vi is visible to vj if and only if the sum of the three angles is 180 degree

  13. A Preliminary Algorithm • For every pair of vertices vi and vj, to determine whether they are visible to each other: • Check every vertex to see whether there exists a triangle witness • Running time: • There are O(n2) pairs of vertices • O(n) time is needed for each pair • O(n3) time is needed

  14. A New Observation • Do not check every vertex in the red part • It is sufficient to check one particular vertex (to see whether it is a triangle witness) • Specifically, check the last visible vertex to vi counterclockwise in the red part

  15. A New Observation (cont.) vj v vi vi is visible to vj if and only if v is a triangle witness

  16. The Proof • Goal: vi is visible to vj if and only if v is a triangle witness • If v is a triangle witness, then vi is visible to vj by the previous observation • If vi is visible to vj, then v is a triangle witness • The key is to prove vis also visible to vj vj v vi

  17. The Proof • Goal: vi is visible to vj if and only if v is a triangle witness • If v is a triangle witness, then vi is visible to vj by the previous observation • If vi is visible to vj, then v is a triangle witness • The key is to prove vis also visible to vj vj v vi

  18. The Algorithm Implementation • There are n/2 iterations • In the k-th iteration (k=1…n/2), we check for each i=1…n whether vi is visible to vi+k • It takes O(1) time to check the visibility of every pair of vertices • By using some arrays and auxiliary variables • Overall running time: O(n2)

  19. Preprocess • The visibility array for v: A[1,2,3,4]={a1,a2,a3,a4} • Preprocessing: • Given any i and j with i≤j, the value A[i,j] = A[i]+A[i+1]+…+A[j] can be computed in O(1) time, a3 a2 a4 a1 v

  20. vj v vi An implementation detail • vj’: The first visible vertex to vi in the blue part counterclockwise • Determine the angle x between viv and vivj’ • Suppose v is the t-th visible vertex of vi along the red part • Suppose b is the number of visibility vertices of vi that have been identified so far (in the red part) • Both t and b are already known • The angle x is A[t,b+1], where A is the visibility array for vi vj vj’ y y v vj’ x x vi

  21. Conclusions • Given the visibility angles around every vertex of a simple polygon P and its cyclically ordered vertex list, • we give an algorithm for reconstructing P in O(n2) time

  22. Thank you Questions?

More Related