Chapter 5: Voronoi Diagrams Wednesday, 2/14/07

20
UMass Lowell Computer Science 91.504 Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Chapter 5: Voronoi Diagrams Chapter 5: Voronoi Diagrams Wednesday, 2/14/07 Wednesday, 2/14/07

description

UMass Lowell Computer Science 91.504 Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007. Chapter 5: Voronoi Diagrams Wednesday, 2/14/07. Chapter 5 Voronoi Diagrams. Applications Preview Definitions & Basic Properties Delaunay Triangulations Algorithms - PowerPoint PPT Presentation

Transcript of Chapter 5: Voronoi Diagrams Wednesday, 2/14/07

Page 1: Chapter 5: Voronoi Diagrams Wednesday, 2/14/07

UMass Lowell Computer Science 91.504 Advanced Algorithms

Computational Geometry Prof. Karen Daniels

Spring, 2007

UMass Lowell Computer Science 91.504 Advanced Algorithms

Computational Geometry Prof. Karen Daniels

Spring, 2007

Chapter 5: Voronoi DiagramsChapter 5: Voronoi DiagramsWednesday, 2/14/07Wednesday, 2/14/07

Page 2: Chapter 5: Voronoi Diagrams Wednesday, 2/14/07

Chapter 5 Voronoi Diagrams

Chapter 5 Voronoi DiagramsApplications PreviewApplications Preview

Definitions & Basic PropertiesDefinitions & Basic PropertiesDelaunay TriangulationsDelaunay Triangulations

AlgorithmsAlgorithmsApplications in DetailApplications in Detail

Medial AxisMedial AxisConnection to Convex HullsConnection to Convex HullsConnection to ArrangementsConnection to Arrangements

Page 3: Chapter 5: Voronoi Diagrams Wednesday, 2/14/07

Applications PreviewApplications Preview

Nearest neighborsNearest neighbors

Minimum spanning tree Minimum spanning tree

Medial axisMedial axis

http://www.ics.uci.edu/~eppstein/gina/scot.drysdale.htmlhttp://www.ics.uci.edu/~eppstein/gina/scot.drysdale.html

Page 4: Chapter 5: Voronoi Diagrams Wednesday, 2/14/07

Common Computational Geometry StructuresCommon Computational Geometry Structures

Voronoi DiagramVoronoi Diagram

Delaunay TriangulationDelaunay Triangulation

Convex HullConvex Hull

New PointNew Point

Combinatorial size in O(n)Combinatorial size in O(n)

Page 5: Chapter 5: Voronoi Diagrams Wednesday, 2/14/07

BasicsBasics

Voronoi region V(pVoronoi region V(pii) is set of all points at ) is set of all points at

least as close to pleast as close to pii as to any other site: as to any other site:

}|||:|{)( ijxpxpxpV jii

ji

jii ppHpV

),()(

Page 6: Chapter 5: Voronoi Diagrams Wednesday, 2/14/07

Delaunay Triangulations: Properties

Delaunay Triangulations: Properties

http://www.cs.cornell.edu/Info/People/chew/Delaunay.htmlhttp://www.cs.cornell.edu/Info/People/chew/Delaunay.html

Page 7: Chapter 5: Voronoi Diagrams Wednesday, 2/14/07

Delaunay Triangulations: Properties

Delaunay Triangulations: Properties

D1. D(P) is the straight-line dual of V(P) [by definition]D1. D(P) is the straight-line dual of V(P) [by definition] D2. D(P) is a triangulation if no 4 points of P are D2. D(P) is a triangulation if no 4 points of P are

cocircular: Every face is a triangle.cocircular: Every face is a triangle. D3. Each face of D(P) corresponds to a vertex of V(P)D3. Each face of D(P) corresponds to a vertex of V(P) D4. Each edge of D(P) corresponds to an edge of V(P)D4. Each edge of D(P) corresponds to an edge of V(P) D5. Each node of D(P) corresponds to a region of V(P)D5. Each node of D(P) corresponds to a region of V(P) D6. The boundary of D(P) is the convex hull of the sitesD6. The boundary of D(P) is the convex hull of the sites D7. The interior of each face of D(P) contains no sitesD7. The interior of each face of D(P) contains no sites

Page 8: Chapter 5: Voronoi Diagrams Wednesday, 2/14/07

Delaunay Triangulations: Properties of Voronoi Diagrams

Delaunay Triangulations: Properties of Voronoi Diagrams

http://www.cs.cornell.edu/Info/People/chew/Delaunay.htmlhttp://www.cs.cornell.edu/Info/People/chew/Delaunay.html

Page 9: Chapter 5: Voronoi Diagrams Wednesday, 2/14/07

Voronoi Diagram: PropertiesVoronoi Diagram: Properties

V1. Each Voronoi region V(pV1. Each Voronoi region V(pii) is convex) is convex V2. V(pV2. V(pii) is unbounded iff p) is unbounded iff pii is on convex hull of point set is on convex hull of point set V3. If v is a Voronoi vertex at junction of V(pV3. If v is a Voronoi vertex at junction of V(p11), V(p), V(p22), V(p), V(p33), ),

then v is center of circle C(v) determined by pthen v is center of circle C(v) determined by p11, p, p22, and p, and p33.. V4. C(v) is circumcircle for Delaunay triangle for vV4. C(v) is circumcircle for Delaunay triangle for v V5. Interior(C(v)) contains no sitesV5. Interior(C(v)) contains no sites V6. If pV6. If pii is a nearest neighbor to p is a nearest neighbor to pjj, then (p, then (pii, p, pjj) is an edge of ) is an edge of

D(P)D(P) V7. If there is some circle through pV7. If there is some circle through pii and p and pjj that contains no that contains no

other sites, then (pother sites, then (pii, p, pjj) is an edge of D(P). [reverse holds too]) is an edge of D(P). [reverse holds too]

Page 10: Chapter 5: Voronoi Diagrams Wednesday, 2/14/07

AlgorithmsAlgorithms

Half-Plane Intersection:Half-Plane Intersection: Construct each Voronoi region separately:Construct each Voronoi region separately:

Intersect n-1 halfplanesIntersect n-1 halfplanes O(n lg n) timeO(n lg n) time

Total time: O(nTotal time: O(n22 lg n) lg n) Incremental Construction:Incremental Construction:

Add one point at a timeAdd one point at a time If new point is inside some Voronoi circle, locally update If new point is inside some Voronoi circle, locally update

diagramdiagram O(n) work per pointO(n) work per point Total time: O(nTotal time: O(n22))

Divide-and-Conquer: O(n lg n)Divide-and-Conquer: O(n lg n)

Page 11: Chapter 5: Voronoi Diagrams Wednesday, 2/14/07

Algorithms: Fortune Algorithms: Fortune

Plane-sweep complication: Plane-sweep complication: What if encounter Voronoi edges before corresponding site?What if encounter Voronoi edges before corresponding site? Solution: Solution:

Expanding circles interpretation (z is time dimension)Expanding circles interpretation (z is time dimension) 2 cones intersect in branch of hyperbola that projects down onto 2 cones intersect in branch of hyperbola that projects down onto (potential)(potential) Voronoi edge Voronoi edge If cones opaque, then Voronoi diagram is view from z = If cones opaque, then Voronoi diagram is view from z = Sweep-line is intersection of slanted plane Sweep-line is intersection of slanted plane with xy-plane with xy-plane Because Because slanted at same angle as cones, L hits site when slanted at same angle as cones, L hits site when first hits cone for site first hits cone for site Invariant: Everything visible underneath Invariant: Everything visible underneath is always finished (that part of Voronoi diagram is done) is always finished (that part of Voronoi diagram is done) Maintain parabolic front = projection of intersection of Maintain parabolic front = projection of intersection of with cones onto xy-plane with cones onto xy-plane EventsEvents

Site event : new (degenerate, single-line) parabola forms. 2 (duplicate) intersection points with parabolic front form Site event : new (degenerate, single-line) parabola forms. 2 (duplicate) intersection points with parabolic front form new degenerate Voronoi diagram edgenew degenerate Voronoi diagram edge

Circle event: 2 parabolic front intersection points meet to form Voronoi vertex. Circle event: 2 parabolic front intersection points meet to form Voronoi vertex. As parabolic front evolves, parabola intersection points trace out Voronoi diagram.As parabolic front evolves, parabola intersection points trace out Voronoi diagram.

O(nlgn)O(nlgn)sweep line L at sweep line L at x x = = ll

45 45

45 slope45 slope

timetimexx

Page 12: Chapter 5: Voronoi Diagrams Wednesday, 2/14/07

How are they related?Delaunay TriangulationHow are they related?Delaunay Triangulation

Project each Project each pointpoint upwards onto upwards onto paraboloid z= xparaboloid z= x22 + y + y22

Construct 3D Construct 3D Convex HullConvex Hull Discard “top” facesDiscard “top” faces Project Convex Hull down to xy Project Convex Hull down to xy

plane to form plane to form Delaunay Delaunay TriangulationTriangulation

View from z = -infinity to see View from z = -infinity to see Delaunay TriangulationDelaunay Triangulation

Page 13: Chapter 5: Voronoi Diagrams Wednesday, 2/14/07

How are they related?Voronoi DiagramHow are they related?Voronoi Diagram

Project each Project each pointpoint upwards onto upwards onto paraboloid z= xparaboloid z= x22 + y + y22

At each projected point, At each projected point, construct plane tangent to construct plane tangent to paraboloid paraboloid tangent above (a,b) istangent above (a,b) is

z = 2ax + 2by - (az = 2ax + 2by - (a22 + b + b22))

View from z = +infinity to see View from z = +infinity to see Voronoi DiagramVoronoi Diagram ““first intersection” of planesfirst intersection” of planes

Page 14: Chapter 5: Voronoi Diagrams Wednesday, 2/14/07

Applications: Nearest NeighborsApplications: Nearest Neighbors

Nearest Neighborhood query for point q Nearest Neighborhood query for point q with respect towith respect to points points PP = = pp11, , pp2 2 ,..., ,..., ppn n can be can be answered using Voronoi diagramanswered using Voronoi diagram

All Nearest Neighbors:All Nearest Neighbors:The Nearest Neighborhood Graph The Nearest Neighborhood Graph (NNG) (NNG) of points of points PP is a graph:is a graph:- whose nodes correspond to the pointswhose nodes correspond to the points

- an arc from an arc from ppii to to ppjj iff iff ppjj is a nearest neighbor of is a nearest neighbor of ppii : :

}|{|min|| kiikji pppp

)(PDNNG

Page 15: Chapter 5: Voronoi Diagrams Wednesday, 2/14/07

Applications: Minimum Spanning TreeApplications: Minimum Spanning Tree

)(PDMST

MST can be used in TSP approximation algorithm.MST can be used in TSP approximation algorithm.

Page 16: Chapter 5: Voronoi Diagrams Wednesday, 2/14/07

Applications: Relative Neighborhood Graph Applications: Relative Neighborhood Graph

The Relative Neighborhood Graph The Relative Neighborhood Graph (RNG) (RNG) of points of points pp11, , pp2 2 ,..., ,..., ppn n is a graph:is a graph:- whose nodes correspond to the pointswhose nodes correspond to the points

- 2 nodes 2 nodes pp11, , pp2 2 share an arc iff they are at least as share an arc iff they are at least as close to each other as to any other point:close to each other as to any other point:

NoteNote: this produces a : this produces a set set of constraints (1 for each m)of constraints (1 for each m)It can be shown that:- every edge of the RNG is an edge of the Delaunay triangulation- every edge of an MST is an edge of the RNG

)(PDRNG

|}|,|{|max|| , mjmijimji pppppp

LUNE LUNE forbidden regionforbidden region

RNGRNGfor 4 sample pointsfor 4 sample points

RNGMST

Page 17: Chapter 5: Voronoi Diagrams Wednesday, 2/14/07

Applications: Largest Empty CircleApplications: Largest Empty Circle

ProblemProblem: Find a largest empty circle whose center : Find a largest empty circle whose center is in the (closed) convex hull of a set of n sites S is in the (closed) convex hull of a set of n sites S ((empty in that it contains no sites in its interior, and largest in that empty in that it contains no sites in its interior, and largest in that

there is no other such circle with strictly larger radiusthere is no other such circle with strictly larger radius).).

FiniteFinite set of potential largest empty circle centers: set of potential largest empty circle centers:

- Voronoi vertices- Voronoi vertices

- Intersections of Voronoi edges and hull of sites.- Intersections of Voronoi edges and hull of sites.

Page 18: Chapter 5: Voronoi Diagrams Wednesday, 2/14/07

Applications: Medial AxisApplications: Medial Axis

Medial Axis Pruning: Robert Ogniewicz of Harvard uses medial axes for shape Medial Axis Pruning: Robert Ogniewicz of Harvard uses medial axes for shape recognition. http://www.ics.uci.edu/~eppstein/gina/medial.htmlrecognition. http://www.ics.uci.edu/~eppstein/gina/medial.html

Page 19: Chapter 5: Voronoi Diagrams Wednesday, 2/14/07

Applications: Medial AxisApplications: Medial Axis

Medial Axis:Medial Axis: of polygon of polygon PP = set of points inside = set of points inside PP that that have > 1 closest point among have > 1 closest point among PP’s boundary points.’s boundary points. Tree whose leaves are vertices of Tree whose leaves are vertices of PP Every point of medial axis is center of circle touching Every point of medial axis is center of circle touching

boundary in at least 2 points.boundary in at least 2 points. Vertices of medial axis are centers of circles touching 3 Vertices of medial axis are centers of circles touching 3

distinct boundary points.distinct boundary points. ““Grassfire” analogy: fire starts at boundaryGrassfire” analogy: fire starts at boundary

Medial axis represents “quench points” where fires meet each otherMedial axis represents “quench points” where fires meet each other

Page 20: Chapter 5: Voronoi Diagrams Wednesday, 2/14/07

Applications: Shewchuck TriangulationApplications: Shewchuck Triangulation

http://www.cs.cmu.edu/~quake/triangle.demo.htmlhttp://www.cs.cmu.edu/~quake/triangle.demo.html