Presentation is loading. Please wait.

Presentation is loading. Please wait.

UMass Lowell Computer Science 91.504 Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Lecture 2 Chapter 2: Polygon Partitioning.

Similar presentations


Presentation on theme: "UMass Lowell Computer Science 91.504 Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Lecture 2 Chapter 2: Polygon Partitioning."— Presentation transcript:

1 UMass Lowell Computer Science 91.504 Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Lecture 2 Chapter 2: Polygon Partitioning Wednesday, 2/7/07 based on textbook Computational Geometry in C by Joseph O’Rourke

2 Chapter 2 Polygon Partitioning useful for triangulations and many other uses!

3 Monotone Partitioning ä A chain is monotone with respect to a line L if every line orthogonal to L intersects the chain in at most 1 point ä P is monotone with respect to a line L if boundary of P can be split into 2 polygonal chains A and B such that each chain is monotone with respect to L ä Monotonicity implies sorted order with respect to L ä Polygon is monotone if it is monotone in neighborhood of every vertex ä Absence of interior cusps guarantees y-monotonicity ä Monotone polygon can be (greedily) triangulated in O(n) time ä deBerg et al.

4 Trapezoidalization ä Partition into trapezoids ä Horizontal line through each vertex ä Diagonal of each interior cusp with each “supporting” vertex yields monotone partition ä To trapezoidalize, vertically sweep horizontal line L ä presort vertices by y (O(nlogn) time) ä maintain sorted list of edges intersecting L ä lg n lookup/insert/delete time (e.g. ht-balanced tree) ä for each vertex ä find edge left and right along sweep line Algorithm: POLYGON TRIANGULATION: MONOTONE PARTITION Sort vertices by y coordinate Perform plane sweep to construct trapezoidalization Partition into monotone polygons by connecting from interior cusps Triangulate each monotone polygon in O(n) time O(n lg n)

5 Partition into Monotone Mountains ä Alternative: ä Trapezoidalize (as before, time in O(nlgn)) ä Partition into monotone mountains ä One monotone chain is a single segment ä Every strictly convex vertex is an ear tip (except maybe base endpoints) ä Connect each pair of trapezoid-supporting vertices that don’t lie on same (left/right) side of their trapezoid ä Triangulate mountains ä Total time in O(nlgn) (as before) Algorithm: TRIANGULATION of MONOTONE MOUNTAIN Identify base edge (find extreme points) Initialize internal angles at each nonbase vertex Link nonbase strictly convex vertices into a circular list while list nonempty do For convex vertex b, remove triangle abc Output diagonal ac Update angles and list O(n)

6 Linear-Time Triangulation YearComplexityAuthors

7 Linear-Time Triangulation ä Chazelle’s Algorithm (High-Level Sketch) ä Computes visibility map ä horizontal chords left and right from each vertex ä Algorithm is like MergeSort (divide-and-conquer) ä Partition polygon of n vertices into n/2 vertex chains ä Merge visibility maps of subchains to get one for chain ä Improve this by dividing process into 2 phases: 1) Coarse approximations of visibility maps for linear- time merge 2) Refine coarse map into detailed map in linear time see paper for details

8 Seidel’s Randomized Triangulation ä 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 Trapezoidalize -> Monotone Mountain -> Triangulate see Section 7.11.4 for details

9 Convex Partitioning ä Competing Goals: ä minimize number of convex pieces ä minimize partitioning time ä To add points or not add points? Theorem (Chazelle): Let  be the fewest number of convex pieces into which a polygon may be partitioned. For a polygon of r reflex vertices: ä Hertel & Melhorn’s Algorithm: ä Essential diagonal d for vertex v if removing d creates nonconvex piece at v ä Iteratively remove inessential diagonals. ä Number of convex pieces: see paper Extra Credit: What algorithm does LEDA use?


Download ppt "UMass Lowell Computer Science 91.504 Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Lecture 2 Chapter 2: Polygon Partitioning."

Similar presentations


Ads by Google