computational geometry
play

Computational Geometry Exercise session #7: Voronoi diagrams - PDF document

Computational Geometry Exercise session #7: Voronoi diagrams Fields of applications of Voronoi Diagrams Applications: 1. The largest empty circle problem 2. Euclidean minimum spanning trees 3. Euclidean traveling salesman problem 4.


  1. Computational Geometry Exercise session #7: Voronoi diagrams • Fields of applications of Voronoi Diagrams • Applications: 1. The largest empty circle problem 2. Euclidean minimum spanning trees 3. Euclidean traveling salesman problem 4. Polyhedral terrain reconstruction • Graphs related to the Delaunay graph • Homework 3 solution 1 Yaron Ostrovsky-Berman, Computational Geometry, Spring 2005 Fields of application • Partial list of fields: � Geology � Anthropology � Linguistics � Archaeology � Marketing � Astronomy � Metallography � Biology � Meteorology � Cartography � Operations research � Chemistry � Physics � Crystallography � Physiology � Ecology � Statistics � Forestry � Remote sensing � Geography � Urban planning 2 Yaron Ostrovsky-Berman, Computational Geometry, Spring 2005 1

  2. The largest empty circle problem • Problem definition : find a largest radius circle whose center is in the (closed) convex hull of a set of n sites S , and contains no sites within its interior. • Motivation : placement of a nuclear reactor as far away from point-cities (maximize minimal distance while keeping maximum small). • An optimization problem with seemingly infinite choice of options (location of center). 3 Yaron Ostrovsky-Berman, Computational Geometry, Spring 2005 Centers inside the convex hull • Imagine inflating a circle from a point p inside the hull until it hits a site (radius = f ( p )). • f ( p ) cannot be a maximum if only one site is hit ( p inside Voronoi cell). • f ( p ) also cannot be a maximum if only two sites are hit ( p on edge of Voronoi diagram). • f ( p ) is possibly at local maximum if three sites are hit at the same time (Voronoi vertex), but not always (sites must encompass more than semicircle). • Conclusion : look at circles at Voronoi vertices. 4 Yaron Ostrovsky-Berman, Computational Geometry, Spring 2005 2

  3. Centers on convex hull boundary • Previous arguments do not apply when point is on boundary of hull. • f ( p ) cannot be a maximum on a hull vertex. • If circle hits one site, f ( p ) can increase by moving to one of the two sides of the hull edge. • f ( p ) can be at local maxima if two sites are hit, since outside of hull is illegal. • Conclusion : maxima of f ( p ) can occur at intersection of Voronoi edges and hull boundary. 5 Yaron Ostrovsky-Berman, Computational Geometry, Spring 2005 Largest empty circle algorithm 1. Compute Voronoi Diagram of sites VD ( S ). 2. Compute convex hull CH ( S ). 3. For each Voronoi vertex v do: • If v is inside CH ( S ) then • Compute radius of circle centered on v, update max 4. For each Voronoi edge e do: Compute p = e ∩ ∂ CH ( S ) • • Compute radius of circle centered on p, update max • Return max 6 Yaron Ostrovsky-Berman, Computational Geometry, Spring 2005 3

  4. Algorithm complexity • Naïve implementation: O ( n 2 ) time. • Efficient implementation: � Step 3 – preprocess CH ( S ) for point inclusion queries costing O (log n ) time each. � Step 4 – find intersection by binary search, discrimination based on vertex-edge sidededness tests: O (log n ) time each. � Total O ( n log n ) time for entire algorithm. 7 Yaron Ostrovsky-Berman, Computational Geometry, Spring 2005 Polyhedral terrain reconstruction 8 Yaron Ostrovsky-Berman, Computational Geometry, Spring 2005 4

  5. Fat triangulations • There are many ways to triangulate a point set. • Good heuristic: maximize minimal angle. 980 10 36 990 9 Yaron Ostrovsky-Berman, Computational Geometry, Spring 2005 Lexicographical order of triangulations • Let t be the number of triangles in triangulation T (constant for fixed point set S ). • Let α 1 , α 2 ,…, α 3 t be the angles of the triangles, sorted by increasing order. • Definition : Triangulation T > T ’ if there exists an index i ≤ 3 t such that α j = α j ’ for all j < i and α i > α i ’. • Theorem : the Delaunay triangulation DT is maximal, that is DT ≥ T , for any T of S . 10 Yaron Ostrovsky-Berman, Computational Geometry, Spring 2005 5

  6. Sketch of proof • The edge flip operation on an ‘illegal edge’ of the triangulation results in T ’ > T . • An edge is illegal iff the enclosing circle contains one of the quadrilateral points. 11 Yaron Ostrovsky-Berman, Computational Geometry, Spring 2005 Sketch of proof, continued • From definition of Delaunay graph as the dual of the Voronoi diagram: � there is an edge between p and q iff there exists a closed disc with p and q on its boundary and no other site in its interior. � Three points p , q , r are the vertices of the same face of the Delaunay graph iff the circle through them contains no other point. • The delaunay triangulation is obtained from repeated edge flipping until no more improvements are possible. 12 Yaron Ostrovsky-Berman, Computational Geometry, Spring 2005 6

  7. Euclidean Minimum Spanning Tree • The Minimum Spanning Tree (MST) of a graph G =( V , E ) is a tree that covers V with minimal total weight of the edges. • Consider the complete graph on a set of points S , with edge weights equal to the Euclidean distance. The MST of this graph is called the EMST of S . • Motivation : minimal cost of a (telephone, cable, …) network that reaches every target. 13 Yaron Ostrovsky-Berman, Computational Geometry, Spring 2005 Kruskal’s algorithm • The greedy approach to growing the tree: � Sort the edges by their weight: e 1 , e 2 ,… � Initialize tree T to be empty, i = 1. � While T is not spanning do: � If T + e i is acyclic then T = T + e i � i = i + 1 • The algorithm can be implemented in O(| E |log| E |) time. • In our case, | E | = n ( n -1)/2. 14 Yaron Ostrovsky-Berman, Computational Geometry, Spring 2005 7

  8. Relation between EMST and DG • Theorem : EMST ( S ) is a subset of the Delaunay graph DG ( S ). • Proof : � Assume edge e =( p,q ) in EMST(S) but not in DG ( S ). � No circle with p , q on boundary is empty. � Circle with e as diameter is not empty ( r inside). � Remove e from EMST ( S ), put either ( p , r ) or ( q , r ) instead to obtain shorter tree � contradiction. 15 Yaron Ostrovsky-Berman, Computational Geometry, Spring 2005 Efficient EMST algorithm • Compute the Delaunay graph of S. • Compute the EMST using Kruskal’s algorithm on the edges of DG. • Complexity: O ( n log n ). 16 Yaron Ostrovsky-Berman, Computational Geometry, Spring 2005 8

  9. Euclidean Traveling Salesman Problem • TSP problem on graphs: visit every vertex and return to origin with minimum total cost. • ETSP problem: similar, except no graph edges specified – every shortcut is possible. • Problem is NP-complete. Known 2- approximation: use the MST as the path, running on all edges twice. • Improvement – make detours where vertex already visited. • The Christofides heuristc: 1.5 approximation. 17 Yaron Ostrovsky-Berman, Computational Geometry, Spring 2005 Graphs related to Delaunay graph • The boundary of the convex hull is a subgraph of the Delaunay graph. • Definition : the Gabriel Graph (GG) has an edge ( p , q ) iff the circle with ( p , q ) as diameter is empty of points in S . • Definition : the Relative Neighborhood Graph (RNG) has an edge ( p , q ) iff d ( p , q ) ≤ min r ≠ p,q { d ( p , r ), d ( q , r )} i.e. lune defined by intersection two discs is empty. 18 Yaron Ostrovsky-Berman, Computational Geometry, Spring 2005 9

  10. Relation between graphs • Definition : the Nearest Neighbor Graph (NNG) has a directed edge p � q iff q is the nearest neighbor of p . DG ( S ) ∂ CH ( S ) GG ( S ) RNG ( S ) EMST ( S ) 19 Yaron Ostrovsky-Berman, Computational Geometry, Spring 2005 10

Recommend


More recommend