You are on page 1of 29

INDIAN INSTITUTE OF TECHNOLOGY ROORKEE

CSN-523: Computational Geometry


Lecture 20: Partitioning a Polygon into Monotone Polygons
(Polygon Partitioning)

Dr. Sudip Roy


Assistant Professor
Department of Computer Science & Engineering
Piazza Class Room: https://piazza.com/iitr.ac.in/spring2017/csn523/home
Moodle Site: http://moodle.iitr.ac.in/course/view.php?id=23 [Enrollment Key: csn523@2017]
Monotone Partition:

2
Partitioning Algorithm Analysis:

Construct priority queue: O(n)


Initialize T: O(1)
Handle an event: O(log n)
one operation on Q: O(logn)
at most 1 query, 1 insertion & 1 deletion on T: O(logn)
insert at most 2 diagonals into D: O(1)

Total run time: O(n log n)


Storage: O(n)

3
Polygon Partitioning:

4
Trapezoidalization:

5
Trapezoidalization:

6
Trapezoidalization:

7
Trapezoidalization:

8
Trapezoidalization:

9
Constructing a Trapezoidalization:

10
Trapezoids Monotone Polygons:

11
Plane Sweep:

12
Trapezoidalization:

13
Trapezoidalization:

14
Plane Sweep:

15
Plane Sweep:

16
Trapezoidalization:

If every interior supporting vertex v is connected to the opposing supporting vertex of the
trapezoid v supports, downward for a "downward" cusp and upward for an "upward" cusp, then
these diagonals partition P into pieces monotone with respect to the vertical.

17
Partition into Monotone Polygons:

18
Triangulation in O(nlogn):

19
Monotone Mountains:

20
Monotone Mountains:

21
Partition into Monotone Mountains:

22
Triangulating a Monotone Mountain:

23
Monotone Mountain Triangulation:

24
Partition into Monotone Mountains:

25
Comparison:

26
Some Approaches to Polygon Triangulation:
O(n2): ORourke Ch. 1: Ear removal
O(nlgn):
Using monotonicity: (see next slide for definition)
Partition polygon into monotone pieces, then quickly triangulate monotone pieces:
deBerg et al.:
O(nlgn): Create y-monotone pieces using diagonals (p.49-55) (CGAL)
O(n): To triangulate a single y-monotone piece (p.55-58)
ORourke Chapter 2, Approach 1:
O(nlgn): Create y-monotone pieces using plane sweep to trapezoidalize (p.
47-50)
O(n): To triangulate a single y-monotone piece (as in deBerg et al.)
ORourke Chapter 2, Approach 2:
O(nlgn): Create monotone mountains using plane sweep to trapezoidalize
Trapezoidalize (p. 47-50)
Add diagonals to convert trapezoidalization into set of monotone
mountains. Recall from Cormen et al.:
log* n = min{i 0 : lg (i ) n 1}
O(n): To triangulate a single monotone mountain (p. 52-53)
O(nlg*n) Expected time: Seidel Randomized Triangulation
Trapezoidalize, monotone mountain, triangulate pieces
Constrained Delaunay triangulation (CGAL) (Delaunay triangulation to be studied later)
O(n): Chazelle (see paper)
27
Towards Linear-Time Triangulation (ORourke):

Year Complexity Authors

1911 O(n2) Lennes


1978 O(n log n) Garey et al.
1983 O(n log r), r reflex Hertel & Melhorn
1984 O(n log s), s sinuosity Chazelle & Incerpi
1986 O(n log log n) Tarjan & Van Wyk
1988 O(n + nt0), t0 int. triangles Toussaint
1989 O(n log* n), randomized Clarkson, Tarjan & Van Wyk
1990 O(n log* n) bounded integer coordinates Kirkpatrick, Klawe, Tarjan
1990 O(n) Chazelle
1991 O(n log*n), randomized Seidel

28
Seidels Randomized Triangulation
(ORourke):
Trapezoidalize -> Monotone Mountain -> Triangulate

Simple, practical algorithm


Randomized: Coin-flip for some decisions
Build trapezoidalization quickly
O(log n) expected cost for locating point in
segment query structure
Coin-flip to decide which segment to add next
log*n phases, each adding subset of segments in
random order to query structure
Recall from Cormen et al.: log* n = min{i 0 : lg (i ) n 1}
See Section 7.11.4 for details

29

You might also like