Polygon Triangulation and Shortest Paths in Polygonal Workspaces, Lecture notes of Data Structures and Algorithms

The concepts of polygon triangulation and finding shortest paths in polygonal workspaces. the Jordan Curve Theorem, different classes of polygons, triangulation theorems, and algorithms for triangulation and finding shortest paths. The document also discusses applications of these concepts in areas such as visibility, robotics, and mesh generation.

Typology: Lecture notes

2020/2021

Uploaded on 02/20/2021

ajay-singh-23
ajay-singh-23 šŸ‡®šŸ‡³

6 documents

1 / 39

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Subhash Suri UC Santa Barbara
Polygon Triangulation
•Apolygonal curve is a finite chain of line
segments.
•Line segments called edges, their
endpoints called vertices.
•A simple polygon is a closed polygonal
curve without self-intersection.
Nonāˆ’Simple Polygons
Simple Polygon
•By Jordan Theorem, a polygon divides
the plane into interior, exterior, and
boundary.
•We use polygon both for boundary and its
interior; the context will make the usage
clear.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27

Partial preview of the text

Download Polygon Triangulation and Shortest Paths in Polygonal Workspaces and more Lecture notes Data Structures and Algorithms in PDF only on Docsity!

Polygon Triangulation

  • A polygonal curve is a finite chain of line segments.
  • Line segments called edges, their endpoints called vertices.
  • A simple polygon is a closed polygonal curve without self-intersection.

Simple Polygon Nonāˆ’Simple Polygons

  • By Jordan Theorem, a polygon divides the plane into interior, exterior, and boundary.
  • We use polygon both for boundary and its interior; the context will make the usage clear.

Polygons

  • Polygons with holes are topologically different; two paths may not be homeomorphic.

Polygon with Holes Convex Polygon^ Starāˆ’Shaped

  • Other common classes of polygons are convex, star-shaped, monotone.
  • Polygons are basic buliding blocks in most geometric applications.
    • Flexible: model arbitrarily complex shapes.
    • Efficient: admit simple algorithms and algebraic representation/manipulation.
    • Thus, significantly more powerful, say, than rectangles as building blocks.

Triangulation Theorem

  1. Every simple polygon admits a triangulation.
  2. Every triangulation of an n-gon has exactly n āˆ’ 2 triangles.
  3. Polygon in picture has n = 13, and 11 triangles.
  4. Before proving the theorem and developing algorithms, consider a cute puzzle that uses triangulation: Art Gallery Theorem.

Art Gallery Theorem

  • The floor plan of an art gallery modeled as a simple polygon with n vertices.
  • How many guards needed to see the whole room?
  • Each guard is stationed at a fixed point, has 360 o^ vision, and cannot see through the walls.
  • Story: Problem posed to Vasek Chvatal by Victor Klee at a math conference in 1973. Chvatal solved it quickly with a complicated proof, which has since been simplified significantly using triangulation.

Trying it Out

  1. For n = 3, 4 , 5 , we can check that g(n) = 1.

n = 3 n = 4 n = 5

g(n) = 1 g(n) = 1 g(n) = 1

  1. Is there a general formula in terms of n?

Pathological Cases

  1. Fig. on left shows that seeing the boundary 6 = seeing the whole interior!
  2. Even putting guards at every other vertex is not sufficient.
  3. Fig. on right shows that putting guards on vertices alone might not give the best solution.

Fisk’s Proof

Lemma: Triangulation graph can be 3-colored.

  • P plus triangulation is a planar graph.
  • 3-coloring means vertices can be labeled 1,2, or 3 so that no edge or diagonal has both endpoints with same label.
  • Proof by Induction:
    1. Remove an ear.
    2. Inductively 3-color the rest.
    3. Put ear back, coloring new vertex with the label not used by the boundary diagonal.

3

2

1

Inductively 3āˆ’color

ear

Proof

1

2 3

(^1 )

1

2

(^1 )

2 1

1

3

2

2

1

2

1

3

1

3

2

3

3

  • Triangulate P. 3-color it.
  • Least frequent color appears at most bn/ 3 c times.
  • Place guards at this color positions—a triangle has all 3 colors, so seen by a gaurd.
  • In example: Colors 1, 2, 3 appear 9, 8 and 7 times, resp. So, color 3 works.

Triangulation: Theory

Theorem: Every polygon has a triangulation.

  • Proof by Induction. Base case n = 3.

p

q

r

z

  • Pick a convex corner p. Let q and r be pred and succ vertices.
  • If qr a diagonal, add it. By induction, the smaller polygon has a triangulation.
  • If qr not a diagonal, let z be the reflex vertex farthest to qr inside 4 pqr.
  • Add diagonal pz; subpolygons on both sides have triangulations.

Triangulation: Theory

Theorem: Every triangulation of an n-gon has n āˆ’ 2 triangles.

  • Proof by Induction. Base case n = 3.

P1 (^) P

u

v

  • Let t(P ) denote the number of triangles in any triangulation of P.
  • Pick a diagonal uv in the given triangulation, which divides P into P 1 , P 2.
  • t(P ) = t(P 1 ) + t(P 2 ) = n 1 āˆ’ 2 + n 2 āˆ’ 2.
  • Since n 1 + n 2 = n + 2, we get t(P ) = n āˆ’ 2.

Untriangulable Polyhedron

a b

c

a’ b’

c’

a

b

c

a’ b’

c’

  • Smallest example of a polyhedron that cannot be triangulated without adding new vertices. (Schoenhardt [1928]).
  • It is NP-Complete to determine if a polyhedron requires Steiner vertices for triangulation.
  • Every 3D polyhedron with N vertices can be triangulated with O(N 2 ) tetrahedra.

Triangulation History

  1. A really naive algorithm is O(n^4 ): check all n^2 choices for a diagonal, each in O(n) time. Repeat this n āˆ’ 1 times.
  2. A better naive algorithm is O(n^2 ); find an ear in O(n) time; then recurse.
  3. First non-trivial algorithm: O(n log n) [GJPT-78]
  4. A long series of papers and algorithms in 80s until Chazelle produced an optimal O(n) algorithm in 1991.
  5. Linear time algorithm insanely complicated; there are randomized, expected linear time that are more accessible.
  6. We content ourselves with O(n log n) algorithm.

Trapezoidal Decomposition

  • Use plane sweep algorithm.
  • At each vertex, extend vertical line until it hits a polygon edge.
  • Each face of this decomposition is a trapezoid; which may degenerate into a triangle.
  • Time complexity is O(n log n).

Monotone Subdivision

  • Call a reflex vertex with both rightward (leftward) edges a split (merge) vertex.
  • Non-monotonicity comes from split or merge vertices.
  • Add a diagonal to each to remove the non-monotonicity.
  • To each split (merge) vertex, add a diagonal joining it to the polygon vertex of its left (right) trapezoid.

A monotone piece