Polygon Partitioning

Polygon Partitioning

Polygon Partitioning O’Rourke, Chapter 2 Outline • Triangle Partitions • Convex Partitions Monotonicity A polygonal 푃 is monotone w.r.t. a line 퐿 if its boundary can be split into two polygon chains, 퐴 and 퐵, such that each chain is monotonic w.r.t. 퐿. 퐿 퐴 퐵 푃 퐿′ Monotonicity A polygonal 푃 is monotone w.r.t. a line 퐿 if its boundary can be split into two polygon chains, 퐴 and 퐵, such that each chain is monotonic w.r.t. 퐿. 퐿 A polygon 푃 is a monotone 푃 mountain w.r.t. 퐿 if it is 퐿′ monotone w.r.t. 퐿 and one of the two chains (the base) is a single segment. Note: Both endpoints of the base have to be convex Claim Every strictly convex vertex of a monotone mountain that is not on the base is an ear tip. WLOG, we will assume that 퐿 퐿 is vertical and that the base is to the left. 푃 퐿′ We will first show that the diagonal has to be interior and then that it cannot intersect the polygon. Proofs Assume ∃ 푣−, 푣, 푣+ ⊂ 푃, with 푣 strictly convex, s.t. 푣−푣+ is not an interior diagonal. + − 푣 푣 cannot be locally 퐿 exterior because: If 푣+ is not on the base, then 푣+푣++ must be below 푣+. 푣− Since 푣 is strictly convex, 푣 푣+푣− is to the left of 푣+푣. 푣+ 푣++ Proofs Assume ∃ 푣−, 푣, 푣+ ⊂ 푃, with 푣 strictly convex, s.t. 푣−푣+ is not an interior diagonal. + − 푣 푣 cannot be locally 퐿 exterior because: If 푣+ is on the base, then 푣+푣− is to the left of 푣+푣. But it must also be to the right 푣− of the base since 푣− is to the right of the base. 푣 푣+ Proofs Assume ∃ 푣−, 푣, 푣+ ⊂ 푃, with 푣 strictly convex, s.t. 푣−푣+ is not an interior diagonal. − + ⇒ If 푣 푣 is not an interior 퐿 diagonal then ∃푥 ∈ 푃, reflex, with 푥 interior to Δ푣+푣푣−. Interior ⇒ it cannot lie on the − chain 푣+푣푣−. 푣 푥 푣 Reflex ⇒ it is not on the base. + ⇒ The horizontal through 푥 푣 intersects 푃 in three points. Monotone Mountain Triangulation Approach: 1. Find a convex vertex not on the base. 2. Remove it. 3. Go to step 1. Note: We can induct because when we remove an ear, we do not violate the monotonicity of the chain. Monotone Mountain Triangulation Approach: 1. Find a convex vertex not on the base. 2. Remove it. 3. Go to step 1. Monotone Mountain Triangulation Approach: 1. Find a convex vertex not on the base. 2. Remove it. 3. Go to step 1. Monotone Mountain Triangulation Approach: 1. Find a convex vertex not on the base. 2. Remove it. 3. Go to step 1. Monotone Mountain Triangulation Approach: 1. Find a convex vertex not on the base. 2. Remove it. 3. Go to step 1. Monotone Mountain Triangulation Approach: 1. Find a convex vertex not on the base. 2. Remove it. 3. Go to step 1. Monotone Mountain Triangulation Approach: 1. Find a convex vertex not on the base. 2. Remove it. 3. Go to step 1. Monotone Mountain Triangulation Approach: 1. Find a convex vertex not on the base. 2. Remove it. 3. Go to step 1. Monotone Mountain Triangulation Approach: 1. Find a convex vertex not on the base. 2. Remove it. 3. Go to step 1. Monotone Mountain Triangulation Approach: 1. Find a convex vertex not on the base. 2. Remove it. 3. Go to step 1. Monotone Mountain Triangulation Approach: 1. Find a convex vertex not on the base. 2. Remove it. 3. Go to step 1. Monotone Mountain Triangulation Approach: 1. Find a convex vertex not on the base. 2. Remove it. 3. Go to step 1. To do this, we need to be able to quickly identify the next convex vertex. Recall: Strictly convex ⇔ interior angle < 휋. Monotone Mountain Triangulation MonotoneMountainTriangulation( 푃 ): – 퐵 ←FindBase( 푃 ) – 퐶 ← LinkConvexVertices( 푃 − 퐵 ) – while 퐶 ≠ ∅: • 푣 ← First( 퐶 ) • output( Δ푣−푣푣+ ) • 푃 ← 푃 − {푣} • if(푣+ ∉ 퐶 AND 푣+ ∉ 퐵 ) • if( ∠푣+ < 휋 ) 푣.addAfter( 푣+ ) • if( 푣− ∉ 퐶 AND 푣− ∉ 퐵 ) • if( ∠푣− < 휋 ) 푣.addBefore( 푣− ) • 퐶 ← 퐶 − {푣} Generating Monotone Mountains Approach: • Compute a trapezoidalization of 푃. • Connect supporting vertices that don’t come from the same side. Generating Monotone Mountains Claim: Such a partition generates pieces that are monotone mountains. Generating Monotone Mountains Proof: This algorithm removes all interior cusps, so the partition pieces are monotone. Generating Monotone Mountains Proof: Given a piece, we can find its topmost 푣 vertex 푣, with neighbors 푣− and 푣+. 푣− Assume 푣+ is lower than 푣−. 푣+ Generating Monotone Mountains Proof: Following the chain down 푣−, we get to the 푣 last vertex, 푤 ∈ 푃, above 푣+. 푣− There is a trapezoid supported by 푤 and 푣+. Since 푤 and 푣+ are on different sides of the trapezoid, the diagonal to 푣+ must be added. 푤 ⇒ 푣+ is a partition endpoint 푣+ Triangulation Triangulate( 푃 ): – Construct a trapezoidalization Triangulation Triangulate( 푃 ): – Construct a trapezoidalization – Connect supporting vertices from different sides. Triangulation Triangulate( 푃 ): – Construct a trapezoidalization – Connect supporting vertices from different sides. – Triangulate the mountains Triangulation Note: The algorithms for triangulating via monotone polygons and monotone mountains works for polygons with disconnected boundaries. Outline • Triangle Partitions • Convex Partitions Convex Partitions Definition: A convex partition by segments of a polygon 푃 is a decomposition of 푃 into convex polygons obtained by introducing arbitrary segments. Convex Partitions Definition: A convex partition by segments of a polygon 푃 is a decomposition of 푃 into convex polygons obtained by introducing arbitrary segments. A convex partition by diagonals of a polygon 푃 is a decomposition of 푃 into convex polygons obtained by only introducing diagonals. Convex Partitions Definition: A convex partition by segments of a polygon 푃 is a decompositionChallenge :of 푃 into convex polygons obtainedCompute by introducing a convex arbitrary partition segments. with the smallest number of pieces. 2 A convex partitionChallenge by diagonals: of a polygonCompute 푃 is a decomposition it efficiently of 푃 into convex polygons obtained by only introducing diagonals. Convex Partitions (by Segments) Claim (Chazelle): Assume the polygon 푃 has 푟 reflex vertices. If Φ is the fewest number of polygons required for a convex partition by segments of 푃 then: 푟/2 + 1 ≤ Φ ≤ 푟 + 1 Convex Partitions (by Segments) Proof (Φ ≤ 푟 + 1): For each reflex vertex, add the bisector. Because the segment bisects, the reflex angle splits into two convex angles. (Angles at the new vertices have to be < 휋.) Doing this for each reflex vertices, gives a convex partition with 푟 + 1 pieces. Convex Partitions (by Segments) Proof ( 푟/2 ≤ Φ): Each reflex vertex needs to be split and each introduced segment can split at most two reflex vertices. Convex Partitions (by Diagonals) Definition: A diagonal in a convex partition is essential for vertex 푣 ∈ 푃 if removing the diagonal creates a piece that is not convex at 푣. Convex Partitions (by Diagonals) Claim: If 푣 is a reflex vertex, it can have at most two essential diagonals. Convex Partitions (by Diagonals) Proof: Given a reflex vertex 푣, let 푣− and 푣+ be the vertices immediately before and after 푣 in 푃. There can be at most one essential segment in the half-space to the right of 푣푣+. (If there were two, we could 푣+ remove the one closer to 푣푣+.) 푣 푣− Convex Partitions (by Diagonals) Proof: Given a reflex vertex 푣, let 푣− and 푣+ be the vertices immediately before and after 푣 in 푃. Similarly, there can be at most one essential segment in the half-space to the right of 푣푣−. 푣+ 푣− Convex Partitions (by Diagonals) Proof: Given a reflex vertex 푣, let 푣− and 푣+ be the vertices immediately before and after 푣 in 푃. Similarly, there can be at most one essential segment in the half-space to the right of 푣푣−. Since the two half-spaces 푣+ cover the interior of the vertex there are at most two essential vertices at 푣. 푣− Convex Partitions (by Diagonals) Algorithm (Hertl & Mehlhorn): Start with a triangulation and remove inessential diagonals. Claim: This algorithm is never worse than 4 × optimal in the number of convex pieces. Convex Partitions (by Diagonals) Proof: When the algorithm terminates, every remaining diagonal is essential for some (reflex) vertex. Each reflex vertex can have at most two essential diagonals. ⇒ There can be at most 2푟 + 1 pieces in the partition. Since at least 푟/2 + 1 are required, the result is within 4 × optimal. Convex Partitions Why do we care? Convex polygons are easier to intersect against. For a polygon with 푛 vertices: • Testing if a point is inside is 푂(log 푛). • Testing if a line intersects is 푂(log 푛). • Testing if two polygons intersect is 푂(log 푛). Point/Convex-Polygon Intersection Algorithm: Recursively split the polygon in half and test the half the point could be in.푣7 푣6 푣8 푣5 푣1 푣4 푞 푣 2 푣3 Point/Convex-Polygon Intersection Algorithm: Recursively split the polygon in half and test the half the point could be in. 푣1 푣4 푞 푣 2 푣3 Point/Convex-Polygon Intersection Algorithm: Recursively split the polygon in half and test the half the point could be in. 푣1 푣4 푞 푣3 Point/Convex-Polygon Intersection InConvexPolygon( 푞 , {푣1, … , 푣푛} ) if( 푛 == 3 ) »return InTriangle( 푞 , {푣1, 푣2, 푣3} ); if( Left( 푣1, 푣푛 2 , 푝 ) ) »return InConvexPolygon( 푞 , {푣푛 2, … , 푣1} ); else »return InConvexPolygon( 푞 , {푣1, … , 푣푛 2} ); Line/Convex-Polygon Intersection Note: Given a convex polygon 푃, a line segment 퐿, and * vertices 푣푖, 푣푗 ∈ 푃 on the same side of 퐿.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    53 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us