Polygon decomposition into monotone polygons Vertex types START - - PowerPoint PPT Presentation

polygon decomposition into monotone polygons vertex types
SMART_READER_LITE
LIVE PREVIEW

Polygon decomposition into monotone polygons Vertex types START - - PowerPoint PPT Presentation

Polygon decomposition into monotone polygons Vertex types START vertex (2 edges on the right and < ) END vertex (2 edges on the left and < ) SPLIT vertex (2 edges on the right and > ) MERGE vertex (2 edges on


slide-1
SLIDE 1

Polygon decomposition into monotone polygons

slide-2
SLIDE 2

START vertex (2 edges on the right and 𝛽 < 𝜌) END vertex (2 edges on the left and 𝛽 < 𝜌) SPLIT vertex (2 edges on the right and 𝛽 > 𝜌) MERGE vertex (2 edges on the left and 𝛽 > 𝜌) REGULAR vertex (1 edge on the left and 1 edge on the right)

Vertex types

slide-3
SLIDE 3

Global algorithm

  • 1. Sort the vertices of P in a lexicographic order (i.e. first on x and then on y) and stock them in a priority queue Q
  • 2. Initialize an empty binary tree T referred to as the status
  • 3. while Q is not empty

Remove the vertex 𝑤𝑗 from Q Call the appropriate procedure to handle the vertex, depending on its type (see following slides)

Decomposition of polygon P into monotone polygons

slide-4
SLIDE 4

Polygon decomposition into monotone polygons

The algorithm proceeds like a planar left-to-right scan. Edges are added to and removed from the status T: For each edge 𝑓

𝑘 a corresponding vertex corr(𝑓 𝑘) exists. The corresponding vertices are defined by the algorithm

itself while it scans the polygon. NB: The corresponding vertex of an edge can change during the algorithm execution!

slide-5
SLIDE 5

handle_start_vertex(𝑤𝑗) { Insert 𝑓𝑗 in T and set corr(𝑓𝑗) to 𝑤𝑗 } handle_end_vertex(𝑤𝑗) { if corr(𝑓𝑗−1) is a MERGE vertex Insert the diagonal connecting 𝑤𝑗 to corr(𝑓𝑗−1) Delete 𝑓𝑗−1 from T }

START and END vertices

slide-6
SLIDE 6

handle_merge_vertex(𝑤𝑗) { if corr(𝑓𝑗−1) is a MERGE vertex Insert the diagonal connecting 𝑤𝑗 to corr(𝑓𝑗−1) Delete 𝑓𝑗−1 from T Search in T to find the edge 𝑓

𝑘 directly below 𝑤𝑗

if corr(𝑓

𝑘) is a MERGE vertex

Insert the diagonal connecting 𝑤𝑗 to corr(𝑓

𝑘)

Set corr(𝑓

𝑘) to 𝑤𝑗

} handle_split_vertex(𝑤𝑗) { Search in T to find the edge 𝑓

𝑘 directly below 𝑤𝑗

Insert the diagonal connecting 𝑤𝑗 to corr(𝑓

𝑘)

Set corr(𝑓

𝑘) to 𝑤𝑗

Insert 𝑓𝑗 in T and set corr(𝑓𝑗) to 𝑤𝑗 }

SPLIT and MERGE vertices

slide-7
SLIDE 7

handle_regular_vertex(𝑤𝑗) { if the interior of P lies above vertex 𝑤𝑗 if corr(𝑓𝑗−1) is a MERGE vertex Insert the diagonal connecting 𝑤𝑗 to corr(𝑓𝑗−1) Delete 𝑓𝑗−1 from T Insert 𝑓𝑗 in T and set corr(𝑓𝑗) to 𝑤𝑗 else Search in T to find the edge 𝑓

𝑘 directly below 𝑤𝑗

if corr(𝑓

𝑘) is a MERGE vertex

Insert the diagonal connecting 𝑤𝑗 to corr(𝑓

𝑘)

Set corr(𝑓

𝑘) to 𝑤𝑗

}

REGULAR vertices