Department of Geoinformation Science Technische Universität Berlin WS 2006/07 Geoinformation Technology: Voronoi Diagrams Alexandra Stadler Institute for.

Slides:



Advertisements
Similar presentations
Geometry Introduction
Advertisements

Polygon Triangulation
Computational Geometry
Efficient access to TIN Regular square grid TIN Efficient access to TIN Let q := (x, y) be a point. We want to estimate an elevation at a point q: 1. should.
Department of Geoinformation Science Technische Universität Berlin WS 2006/07 Geoinformation Technology: lecture 9a Triangulated Networks Prof. Dr. Thomas.
Lecture 3: Parallel Algorithm Design
2/14/13CMPS 3120 Computational Geometry1 CMPS 3120: Computational Geometry Spring 2013 Planar Subdivisions and Point Location Carola Wenk Based on: Computational.
 Distance Problems: › Post Office Problem › Nearest Neighbors and Closest Pair › Largest Empty and Smallest Enclosing Circle  Sub graphs of Delaunay.
Brute-Force Triangulation
CS16: Introduction to Data Structures & Algorithms
UNC Chapel Hill M. C. Lin Polygon Triangulation Chapter 3 of the Textbook Driving Applications –Guarding an Art Gallery –3D Morphing.
I. The Problem of Molding Does a given object have a mold from which it can be removed? object not removable mold 1 object removable Assumptions The object.
1 Voronoi Diagrams. 2 Voronoi Diagram Input: A set of points locations (sites) in the plane.Input: A set of points locations (sites) in the plane. Output:
The Divide-and-Conquer Strategy
Ruslana Mys Delaunay Triangulation Delaunay Triangulation (DT)  Introduction  Delaunay-Voronoi based method  Algorithms to compute the convex hull 
By Groysman Maxim. Let S be a set of sites in the plane. Each point in the plane is influenced by each point of S. We would like to decompose the plane.
Advanced Topics in Algorithms and Data Structures Lecture 7.1, page 1 An overview of lecture 7 An optimal parallel algorithm for the 2D convex hull problem,
Convex Hulls in 3-space Jason C. Yang.
Convex Hull Problem Presented By Erion Lin. Outline Convex Hull Problem Voronoi Diagram Fermat Point.
3/5/15CMPS 3130/6130 Computational Geometry1 CMPS 3130/6130 Computational Geometry Spring 2015 Delaunay Triangulations II Carola Wenk Based on: Computational.
Tutorial 2 – Computational Geometry
9/5/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2006 Plane Sweep Algorithms and Segment Intersection Carola Wenk.
Voronoi Diagram Presenter: GI1 11號 蔡逸凡
Lecture 7: Voronoi Diagrams Presented by Allen Miu Computational Geometry September 27, 2001.
Computational Geometry -- Voronoi Diagram
17. Computational Geometry Chapter 7 Voronoi Diagrams.
2. Voronoi Diagram 2.1 Definiton Given a finite set S of points in the plane , each point X of  defines a subset S X of S consisting of the points of.
Computational Geometry and Spatial Data Mining
1 Lecture 8: Voronoi Diagram Computational Geometry Prof. Dr. Th. Ottmann Voronoi Diagrams Definition Characteristics Size and Storage Construction Use.
By Dor Lahav. Overview Straight Skeletons Convex Polygons Constrained Voronoi diagrams and Delauney triangulations.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Chapter 5: Voronoi Diagrams Wednesday,
Voronoi Diagrams Computational Geometry, WS 2006/07 Lecture 10 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
Prune-and-search Strategy
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2004 Chapter 5: Voronoi Diagrams Monday, 2/23/04.
Point Location Computational Geometry, WS 2007/08 Lecture 5 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für.
Closest Pair of Points Computational Geometry, WS 2006/07 Lecture 9, Part II Prof. Dr. Thomas Ottmann Khaireel A. Mohamed Algorithmen & Datenstrukturen,
Lecture 6: Point Location Computational Geometry Prof. Dr. Th. Ottmann 1 Point Location 1.Trapezoidal decomposition. 2.A search structure. 3.Randomized,
Voronoi Diagrams.
Computational Geometry
Brute-Force Triangulation
Voronoi Diagram A Captivating Geometrical Construct Presented by: Lamour Roberts Preceptor: Dr. Bruno Guerrieri (Associate Professor of Mathematics) Department.
UNC Chapel Hill M. C. Lin Point Location Chapter 6 of the Textbook –Review –Algorithm Analysis –Dealing with Degeneracies.
Voronoi Diagram and Delaunay Triangulation
UNC Chapel Hill M. C. Lin Point Location Reading: Chapter 6 of the Textbook Driving Applications –Knowing Where You Are in GIS Related Applications –Triangulation.
UNC Chapel Hill M. C. Lin Linear Programming Reading: Chapter 4 of the Textbook Driving Applications –Casting/Metal Molding –Collision Detection Randomized.
UNC Chapel Hill M. C. Lin Line Segment Intersection Chapter 2 of the Textbook Driving Applications –Map overlap problems –3D Polyhedral Morphing.
5 -1 Chapter 5 The Divide-and-Conquer Strategy A simple example finding the maximum of a set S of n numbers.
© The McGraw-Hill Companies, Inc., Chapter 6 Prune-and-Search Strategy.
C o m p u t i n g C O N V E X H U L L S. Presentation Outline 2D Convex Hulls –Definitions and Properties –Approaches: Brute Force Gift Wrapping QuickHull.
Week Aug-24 – Aug-29 Introduction to Spatial Computing CSE 5ISC Some slides adapted from Worboys and Duckham (2004) GIS: A Computing Perspective, Second.
2/19/15CMPS 3130/6130 Computational Geometry1 CMPS 3130/6130 Computational Geometry Spring 2015 Voronoi Diagrams Carola Wenk Based on: Computational Geometry:
Voronoi Diagram (Supplemental)
Arrangements and Duality Sanjay Sthapit Comp290 10/6/98.
UNC Chapel Hill M. C. Lin Computing Voronoi Diagram For each site p i, compute the common inter- section of the half-planes h(p i, p j ) for i  j, using.
UNC Chapel Hill M. C. Lin Delaunay Triangulations Reading: Chapter 9 of the Textbook Driving Applications –Height Interpolation –Constrained Triangulation.
Lecture 15 Computational Geometry Geometry sweeping Geometric preliminaries Some basics geometry algorithms.
9/8/10CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2010 Triangulations and Guarding Art Galleries Carola Wenk.
Polygon Triangulation
VORONOI DIAGRAMS BY KATHARINE TISCHER Coordinating Seminar Spring 2013.
UNC Chapel Hill M. C. Lin Geometric Data Structures Reading: Chapter 10 of the Textbook Driving Applications –Windowing Queries Related Application –Query.
3. Polygon Triangulation
Computational Geometry
Lecture 3: Parallel Algorithm Design
VORONOI DIAGRAMS FOR PARALLEL HALFLINES IN 3D
Algorithm design techniques Dr. M. Gavrilova
KD Tree A binary search tree where every node is a
Efficient Distance Computation between Non-Convex Objects
Chapter 7 Voronoi Diagrams
I. The Problem of Molding
Kinetic Collision Detection for Convex Fat Objects
Presentation transcript:

Department of Geoinformation Science Technische Universität Berlin WS 2006/07 Geoinformation Technology: Voronoi Diagrams Alexandra Stadler Institute for Geodesy and Geoinformation Science Technische Universität Berlin Credits: This material is mostly an english translation of the course module no. 2 (‘Geoobjekte und ihre Modellierung‘) of the open e-content platform

2 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Voronoi Diagrams – An Overview  Introduction  Geometric Interpretation  History  Applications  Definition  Construction  Computing the Voronoi Diagram Intersection of Half-planes Divide and Conquer Sweep Plane (Fortune)  Literature

3 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Voronoi Diagrams – An Overview  Introduction  Geometric Interpretation  History  Applications  Definition  Construction  Computing the Voronoi Diagram Intersection of Half-planes Divide and Conquer Sweep Plane (Fortune)  Literature

4 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Introduction Planning of a supermarket chain  profitable? How do people decide where to do their shopping? Similar question: Where do people post their letters?  “Post Office Problem” (Computational Geometry). To study this problem we make the following simple assumptions:  The price is the same at every site  The cost of transportation to the site is a linear function of the Euclidean distance  Customers try to minimize the cost of acquiring the good or service

5 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Voronoi Diagrams – An Overview  Introduction  Geometric Interpretation  History  Applications  Definition  Construction  Computing the Voronoi Diagram Intersection of Half-planes Divide and Conquer Sweep Plane (Fortune)  Literature

6 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Geometric Interpretation Voronoi diagram = subdivision of the total area into regions (the trading areas of the sites)  People who live in the same region all go to the same site  The trading area for a given site consists of all those points for which that site is closer than any other site

7 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Voronoi Diagrams – An Overview  Introduction  Geometric Interpretation  History  Applications  Definition  Construction  Computing the Voronoi Diagram Intersection of Half-planes Divide and Conquer Sweep Plane (Fortune)  Literature

8 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 History  1644: Descartes was first to use Voronoi diagrams – he described the regions of gravitational influence of the sun and other stars Georgy Voronoi René Descartes  However, they are named after Georgy Fedoseevich Voronoi studies on positive quadratic forms (together with Peter Gustav Lejeune Dirichlet)

9 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Voronoi Diagrams – An Overview  Introduction  Geometric Interpretation  History  Applications  Definition  Construction  Computing the Voronoi Diagram Intersection of Half-planes Divide and Conquer Sweep Plane (Fortune)  Literature

10 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Applications in Real World  Astronomy -- Identify clusters of stars and clusters of galaxies  Biology, Ecology, Forestry -- Model and analyze plant competition ("Area potentially available to a tree", "Plant polygons")  Geography -- Analyzing patterns of urban settlements  Geometric Modelling -- Finding "good" triangulations of 3D surfaces  Marketing -- Modelling of market areas  Mathematics -- Study of positive definite quadratic forms ("Dirichlet tesselation", "Voronoi diagram")  Meteorology -- Estimate regional rainfall averages ("Thiessen polygons")  Pattern Recognition -- Find simple descriptors for shapes that extract 1D characterizations from 2D shapes ("Medial axis" or "skeleton" of a contour)  Physiology -- Analysis of capillary distribution in cross-sections of muscle tissue to compute oxygen transport ("Capillary domains")  Robotics -- Path planning in the presence of obstacles  Zoology -- Model and analyze the territories of animals

11 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Applications within the Field of Computer Science  Knuth's Post Office Problem -- Given a set of locations for post offices, how do you determine the closest post office to a given house? (ignoring zip codes)  All Nearest Neighbors -- Given a set of points, find each point's nearest neighbors  Euclidean Minimum Spanning Tree, Convex Hull -- as parts of the Delaunay triangulation  Closest Pair -- Given a set of points, which two are closest together?  Largest Empty Circle -- also known as the Toxic Waste Dump Problem

12 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Voronoi Diagrams – An Overview  Introduction  Geometric Interpretation  History  Applications  Definition  Construction  Computing the Voronoi Diagram Intersection of Half-planes Divide and Conquer Sweep Plane (Fortune)  Literature

13 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Definition Let P={p 1, p 2,…,p n } be a set of n distinct points in the plane; these are the sites. We define the Voronoi diagram of P as the subdivision of the plane into n cells, one for each site in P, with the property that a point q lies in the cell corresponding to a site p i if and only if dist(q,p i ) < dist(q,p j ) for each p j є P with j≠i. The cells represent the trading areas of the sites p i ; they are called Voronoi regions. The boundary of a Voronoi region may consist of line segments, half-lines and infinite lines, which we call Voronoi edges. The end points of Voronoi edges are called Voronoi nodes. They belong to the boundary of 3 or more Voronoi regions. i Voronoi edge Voronoi node site Voronoi region

14 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Voronoi Diagrams – An Overview  Introduction  Geometric Interpretation  History  Applications  Definition  Construction  Computing the Voronoi Diagram Intersection of Half-planes Divide and Conquer Sweep Plane (Fortune)  Literature

15 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Construction of the Voronoi Diagram ?

16 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Construction of the Voronoi Diagram  Definition: Bisector of p 1 and p 2 = perpendicular bisector of the line segment p 1 p 2 Splits the plane into two half-planes, each containing the points closer to p 1 or p 2 respectively  Retrieve all the points closer to p 1 than to any other point in the plane Calculate n-1 bisectors between p 1 and all the other points Intersection of n-1 half-planes  (possibly unbounded) open convex polygonal region bounded by at most n-1 vertices and at most n-1 edges

17 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Voronoi Diagrams – An Overview  Introduction  Geometric Interpretation  History  Applications  Definition  Construction  Computing the Voronoi Diagram Intersection of Half-planes Divide and Conquer Sweep Plane (Fortune)  Literature

18 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Voronoi Diagrams – An Overview  Introduction  Geometric Interpretation  History  Applications  Definition  Construction  Computing the Voronoi Diagram Intersection of Half-planes Divide and Conquer Sweep Plane (Fortune)  Literature

19 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation I: Intersection of Half-planes Algorithm I (Naïve method)…  Input: list of n sites P  Output: Voronoi diagram for P  Step1: For each site generate n-1 half-planes and compute their common intersection  Step2: Return all intersections as regions of the Voronoi diagram

20 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation I: Intersection of Half-planes Algorithmic Complexity – Algorithm I (Naïve method)…  Input: list of n sites P  Output: Voronoi diagram for P  Step1: For each site generate n-1 half-planes and compute their common intersection  Step2: Return all intersections as regions of the Voronoi diagram  O(n³) O(n²logn) naïve more sophisticated  O(n) O(n) O(n³) O(n²logn)

21 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Voronoi Diagrams – An Overview  Introduction  Geometric Interpretation  History  Applications  Definition  Construction  Computing the Voronoi Diagram Intersection of Half-planes Divide and Conquer Sweep Plane (Fortune)  Literature

22 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation II: Divide and Conquer Divide and Conquer…  one of the fundamental paradigms for designing efficient algorithms  original problem is recursively divided into several simple subproblems of almost equal size  solution of the original problem is obtained by merging the solutions of the subproblems

23 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation II: Divide and Conquer Algorithm II.1 (Divide and conquer method)… Input: List of sites P in increasing order of the x coordinates Output: Voronoi diagram for P  Step1: if n<=3  Direct construction of the Voronoi diagram  Step2: otherwise: Divide P into P L and P R (using the median) Compute Voronoi diagrams for P L and P R by algorithm II.1 (recursion!) Merge the Voronoi diagrams by algorithm II.3  Step3: Return the Voronoi diagram for P

24 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation II: Divide and Conquer Algorithm II.1 (Divide and conquer method)… Animation:

25 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation II: Divide and Conquer  Essential problem: Merging of two Voronoi diagrams Generate new Voronoi nodes Generate new Voronoi edges  result from the interaction of left and right sites Delete superfluous portions from the input Voronoi diagrams  The sets of sites P L and P R can be separated by a vertical line.  To construct the new nodes and edges, we want to start at the top  We need an algorithmic tool for finding the topmost edge/line such that It touches two disjoint convex polygons and All other points of the polygons lie on the same side of the line.

26 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation II: Divide and Conquer Algorithm II.2 (Upper common support)… Input: 2 non-overlapping convex polygons U L and U R (convex hull of P L and P R ) Output: Pair of nodes such that the line L(u,w) forms the upper common support  Step1: Find the node in U L with the largest x coordinate  u and the node in U R with the smallest x coordinate  w  Step2: Until no more nodes are detected: While the next node on U L (ccw) lies above L(u,w): replace u While the next node on U R (cw) lies above L(u,w): replace w  Step3: Return the pair of nodes (u,w)

27 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation II: Divide and Conquer Algorithm II.2 (Upper common support)… Animation:

28 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation II: Divide and Conquer Algorithm II.3 (Merger of two Voronoi diagrams)… Input: 2 Voronoi diagrams for P L and P R Output: Voronoi diagram for P L  P R (=P)  Step1: Compute the convex hulls of P L and of P R  Step2: Find the upper common support by algorithm II.2 and mark the corresponding regions as active  Step3: Find a point at infinity upward on the bisector of the resulting pair of nodes  Step4: While the upper common support is not reached: Find the intersections of the bisector with the active Voronoi region Choose the intersection with the largest y coordinate and activate the next Voronoi region  Step5: Add the polygonal line and delete superfluous portions from the input Voronoi diagrams

29 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation II: Divide and Conquer Algorithm II.3 (Merger of two Voronoi diagrams)… Animation:

30 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation II: Divide and Conquer Data Structure  Doubly-connected edge-list  Advantages: Direct access to neighboring regions Iterate the boundary in linear time  But: Half-lines & full lines cannot be represented in this structure  Bounding box

31 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation II: Divide and Conquer Algorithm II.1 (Divide and conquer method)… Input: List of sites P in increasing order of the x coordinates Output: Voronoi diagram for P  Step1: if n<=3  Direct construction of the Voronoi diagram  Step2: otherwise: Divide P into P L and P R (using the median) Compute Voronoi diagrams for P L and P R by algorithm II.1 (recursion!) Merge the Voronoi diagrams by algorithm II.3  Step3: Return the Voronoi diagram for P

32 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation II: Divide and Conquer Algorithmic Complexity – Algorithm II.1 (Divide and conquer method)… Input: List of sites P in increasing order of the x coordinates Output: Voronoi diagram for P  Step1: if n<=3  Direct construction of the Voronoi diagram  Step2: otherwise: Divide P into P L and P R (using the median) Compute Voronoi diagrams for P L and P R by algorithm II.1 (recursion!) Merge the Voronoi diagrams by algorithm II.3  Step3: Return the Voronoi diagram for P  O(1)  2T(n/2)  O(n) 2T(n/2)+O(n)

33 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation II: Divide and Conquer Algorithmic Complexity – Alg II.1 (Divide and conquer method)…  optimal in terms of worst case complexity T(n) = 2T(n/2)+O(n) Total: T(n) = O(nlogn) Recursion tree method

34 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Voronoi Diagrams – An Overview  Introduction  Geometric Interpretation  History  Applications  Definition  Construction  Computing the Voronoi Diagram Intersection of Half-planes Divide and Conquer Sweep Plane (Fortune)  Literature

35 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation III: Sweep Plane (Fortune) Sweep Plane Method…  Another fundamental paradigm for designing efficient geometric algorithms  Strategy: Sweep a line – the sweep line – from top to bottom across the plane  While sweeping, information is maintained regarding the structure one wants to determine  Information only changes at certain special points, the so called event points

36 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation III: Sweep Plane (Fortune)  Problem: The part of V above the sweep line l depends also on sites below l (l enters a Voronoi region before it meets its corresponding site!) …sweep line l …sites below l …sites above l

37 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation III: Sweep Plane (Fortune) DON’T maintain intersections of V with the sweep line DO maintain information about the part of V that is fix - corresponding to the sites above l  What part of V cannot be changed anymore?  Which points q above l have fixed nearest neighbors?  Definition of an area consisting of points q that lie nearer to any known site (above l) than to l and the points below  All sites below l cannot influence q  Special geometric feature, which is defined as the set of points with the same distance of a point and a line  PARABOLA

38 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation III: Sweep Plane (Fortune)  Every site above l defines a complete parabola  Merging all areas limited by the parabolas Boundary = beach line  The beach line is the function that (for each x coordinate) passes through the lowest point of all parabolas  At the breakpoints, the distance to both sides must be the same as the distance to l  While sweeping, the breakpoints of the beach line exactly trace out the Voronoi diagram  We maintain the beach line (but not explicitly since it changes continuously) – more later…

39 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation III: Sweep Plane (Fortune) Changes in the combinatorial structure of the beach line – Where and how?  When a new parabolic arc appears on it (a).  When a parabolic arc shrinks to a point and disappears (b). (a) (b)

40 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation III: Sweep Plane (Fortune) When does a new parabolic arc appear?  When the sweep line reaches a new site.  a new parabola is formed (defined by the new site)  The part of the new parabola below the old beach line is now part of the new beach line. degenerated parabola with zero width  SITE EVENT

41 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation III: Sweep Plane (Fortune) What happens to V at a site event?  2 breakpoints appear  trace out the same edge (they coincide first and then move in opposite directions)  = the only way for the appearing of new arcs (max 2n-1 arcs). initially the edge is not connected to the rest of V

42 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 α α'α' α'' q q Computation III: Sweep Plane (Fortune) When does an existing arc shrink to a point and disappear?  When α ' disappears, all 3 consecutive arcs meet in a point q, which is equidistant from l and each of the 3 sites  circle through the 3 sites, q as center, touching l  No other sites can be inside the circle  3 equidistant sites to q, no nearer sites possible  node of V  CIRCLE EVENT

43 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation III: Sweep Plane (Fortune)  2 possibilities for changes in the structure of the beach line  SITE EVENT The sweep line reaches a new site A new arc appears A new edge starts to grow  CIRCLE EVENT Circle through 3 sites, q as center, touching l An existing arc drops out 2 growing edges meet to form a Voronoi node in q

44 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation III: Sweep Plane (Fortune)  Leaves = arcs of the beach line (ordered!) stored value: site defining the arc pointer to: node representing circle event when arc disappears  Internal nodes = breakpoint between arcs stored value: ordered tuple of sites (defining left/right parabola) pointer to: edge that breakpoint traces out  We can find the arc lying above a new site in O(logn) time Representation of the beach line: balanced binary tree T

45 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation III: Sweep Plane (Fortune) The event queue Q as a priority queue for handling events  Ordered by y coordinates  priority  Stored events: SITE EVENT  site is stored (known in advance) CIRCLE EVENT  lowest point of the circle is stored pointer to the leaf in T representing the disappearing arc (have to be detected)

46 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation III: Sweep Plane (Fortune) Algorithm III (Sweep plane method)… Input: A set P of sites in the plane Output: V for P  Step1: Initialize the event queue Q with all site events  Step2: WHILE Q is not empty DO Remove the event with largest y coordinate from Q  p i IF the event is a site event THEN HandleSiteEvent(p i ) ELSE HandleCircleEvent(γ), where γ is the leaf of T representing the arc that will disappear  Step3: the remaining internal nodes in T represent half-infinite edges  add them to V  Step4: Return V

47 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation III: Sweep Plane (Fortune) Procedure HandleSiteEvent(p i )  Step1: IF T is empty, insert p i into it  Step2: ELSE Search in T for arc α vertically above p i IF α has pointer to circle event  false alarm  delete from Q Replace in T the leaf containing α by a subtree with the leaves p j, p i, p j and the internal nodes and  rebalancing Create new record in V for half-edge separating V(p i ) and V(p j ) Check the triple of consecutive arcs (for p i … left/right arc) IF the breakpoints converge  insert circle event into Q

48 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation III: Sweep Plane (Fortune) Procedure HandleCircleEvent(γ)  Step1: Delete the leaf γ from T representing the disappearing arc α  update internal nodes, rebalancing Delete circle events involving α from Q  Step2: Add the center of the circle causing the event as a node to V  Step3: Create 2 half-edge records in V corresponding to the new breakpoint of the beach line  Step4: Check the new triples of consecutive arcs (where the former left/right neighbor of α is the middle arc ) IF the breakpoints converge  insert circle event into Q

49 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Computation III: Sweep Plane (Fortune) Algorithmic Complexity - Algorithm III (Sweep plane method)…  Primitive operations on the tree and the event queue: O(logn)  Primitive operations on the doubly-connected edge list: O(1)  Handling an event: constant number of such primitive operations  O(logn) n site events  O(nlogn) Linear number of circle events  O(nlogn) Total: O(nlogn)  optimal in terms of worst case complexity

50 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Voronoi Diagrams – An Overview  Introduction  Geometric Interpretation  History  Applications  Definition  Construction  Computing the Voronoi Diagram Intersection of Half-planes Divide and Conquer Sweep Plane (Fortune)  Literature

51 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Literature Okabe, Atsuyuki et al.: Spatial Tesselations: Concepts and Applications of Voronoi-Diagramms. John Wiley & Sons, de Berg, van Kreveld et al.: Computational Geometry – Algorithms and Applications. Springer,  Voronoi game  Interactive generation of Voronoi diagram, Delaunay traingulation and Convex hull  Voronoi art

52 A. Stadler – Geoinformation Technology: lecture 11 Department of Geoinformation Science WS 2006/07 Outlook So, maybe in future you will explore some astonishing analogies...