Presentation is loading. Please wait.

Presentation is loading. Please wait.

Art Gallery Theorem Computational Geometry, WS 2006/07 Lecture 8, Part 1 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.

Similar presentations


Presentation on theme: "Art Gallery Theorem Computational Geometry, WS 2006/07 Lecture 8, Part 1 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik."— Presentation transcript:

1 Art Gallery Theorem Computational Geometry, WS 2006/07 Lecture 8, Part 1 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für Angewandte Wissenschaften Albert-Ludwigs-Universität Freiburg

2 Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann2 Agenda Motivation: Guarding art galleries Art gallery theorem for simple polygons Partitioning of polygons into monotone pieces Triangulation of y-monotone polygons

3 Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann3 Guarding art galleries Problem Definition Imagine an art gallery room whose floor plan can be modeled by a polygon of n vertices. Victor Klee asked (1973): How many stationary guards are needed to guard the room?

4 Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann4 Guarding art galleries The gallery is represented by a simple polygon A guard is represented by a point within the polygon Guards have a viewport of 360°, and of course cannot see through a wall A polygon is completely guarded, if every point within the polygon is guarded by at least one of the watchmen Visibility polygon: The visibility polygon of a polygon P is defined by the set of all points that are visible from a base point p. Demo

5 Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann5 Guarding art galleries We are NOT interested in the minimum number of guards for a specific polygon, but rather want to determine the number of guards that suffice for an arbitrary polygon with n vertices. Even if two polygons have the same number of vertices, one may be easier to guard than the other.

6 Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann6 Guarding art galleries If the polygon is complex, it is not obvious to see how many gurads are needed. Idea: Divide the polygon into pieces that are easy to guard

7 Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann7 Guarding a triangulated polygon

8 Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann8 Triangulation of simple polygons Does every simple polygon admit a triangulation? If yes, what is the number of triangles? Does any triangulation of a polygon P lead to the same number of triangles?

9 Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann9 Theorem Theorem: Every simple polygon admits a triangulation. Proof:By induction on n. Let n>3, and assume theorem is true for all m<n. Let P be polygon with n vertices. We first prove the existence of a diagonal in P. Let v be leftmost vertex of P. Let u and v be two neighboring vertices of v. If uw lies in the interior of P we have found a diagonal. Else, there are one or more vertices inside the triangle defined by u, v, and w. Let v´ be the farthest vertex from uw. The segment connecting v´ to v cannot intersect an edge of p (contradicts the definition of v´). Hence vv´ is a diagonal.

10 Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann10 Case 2: uw not completely in P Proof of Diagonal Consider leftmost vertex v of P Case 1: uw completely in P u v w u v w

11 Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann11 Diagonals and Triangulation So a diagonal exists. Any diagonal cuts P in two simple sub-polygons P1 and P2. Let m1 be the number of vertices of P1 and m2 the number of vertices of P2. Both m1 and m2 must be smaller than n, so by induction hypothesis P1 and P2 can be triangulated so P can be triangulated as well. Back to the questions Does any triangulation of a polygon P lead to the same number of triangles? If yes, what is the number of triangles?

12 Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann12 Theorem Theorem : Any triangulation of P contains n-2 triangles. Proof : By induction on n. n=3 trivial. Let n>3, and assume theorem is true for all m<n. Consider an arbitrary diagonal in some triangulation T p. This diagonal cuts P into 2 subpolygons with m 1 and m 2 vertices: m 1 + m 2 = n + 2. So by induction hypothesis any triangulation of P i contains m i - 2 triangles  (m 1 - 2) + (m 2 - 2) = n - 2 triangles.

13 Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann13 Upper and lower bounds for the number of guards We know that for any simple polygon with n vertices n-2 guards are always enough. But can we do better?

14 Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann14 Upper and lower bounds for the number of guards Idea: Compute a 3-coloring of the vertices and place guards on nodes with the least-frequently used color. No two nodes connected by an edge are assigned the same color. -> Every triangle has all 3 colors. Hence every triangle is watched. Hence the entire polygon is watched.

15 Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann15 Example

16 Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann16 3- coloring Theorem: The triangulation graph of a polygon P is 3-colorable. Proof: Induction on n. Clearly, a triangle can be 3-colored. Let n>3, and assume theorem is true for all m<n. By Meister’s Two Ears Theorem, P has an ear abc. Corollary:  n/3  guards are always sufficient to guard a simple Polygon with n vertices. c b a

17 Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann17 Art gallery theorem For a simple polygon with n vertices,  n/3  cameras are occasionally necessary and always sufficient to have every point in the polygon visible from at least one of the cameras. Worst-case example?

18 Computational Geometry, WS 2006/07 Prof. Dr. Thomas Ottmann18 Worst-case example Demo


Download ppt "Art Gallery Theorem Computational Geometry, WS 2006/07 Lecture 8, Part 1 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik."

Similar presentations


Ads by Google