Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computational Geometry -- Voronoi Diagram

Similar presentations


Presentation on theme: "Computational Geometry -- Voronoi Diagram"— Presentation transcript:

1 Computational Geometry -- Voronoi Diagram
Sophie Che

2 The Largest Empty Circle Problem
An application of Voronoi Diagram

3 4/16/2017 7:23 AM

4 Largest Empty Circle S : site points e : Voronoi edge
v : Voronoi vertex e : Voronoi edge e The problem is Given a set S of site points, find a largest empty circle s.t. its center is in the convex hull of S, its interior contains no sites and it is the largest one of such circles. Convex hull is the smallest convex polygon in the plane that contains all of the points of S. Imagine a number of nails in a plane. You stretch a rubber band around all the nails. Then release the rubber band. The convex hull is the region bounded by the rubber band. It has been proven that the center of the largest empty circle must lie on the Voronoi diagram. Convex: a convex polygon is a simple polygon s.t. every line segment between two vertices are either inside the polygon or on its boundary. 4/16/2017 7:23 AM

5 Definitions & Basic Properties
Of Voronoi Diagram

6 Definition pi 4/16/2017 7:23 AM

7 Formal Definition Let P be a set of n distinct points (sites) in the plane. The Voronoi diagram of P is the subdivision of the plane into n cells, one for each site. A point q lies in the cell corresponding to a site pi  P iff Euclidean_Distance(q, pi) < Euclidean_distance(q, pj) for each pi  P, j  i. 4/16/2017 7:23 AM

8 Structure 2 sites 3 sites 4 sites Perpendicular Bisector
Non-collinear sites Half lines meeting at a Voronoi vertex 4 sites A bounded cell 4/16/2017 7:23 AM

9 Structure (Cont’d) More sites… V(pi) = 1 j  n, j  i h(pi,pj) pi
4/16/2017 7:23 AM

10 Complexity (Size) Intuitively: n2 Actually: O(n) n sites
At most n-1 vertices and edges per cell Actually: O(n) For n  3, |v|  2n  5, |e|  3n  6 4/16/2017 7:23 AM

11 Linear Complexity – proof
Euler’s Formula: For planar graphs, |V| – |E| + F = 2 Connecting all half-infinite edges to an extra vertex  (|v| + 1) – |e| + n = 2 Plus,  |v|  2n  5 |e|  3n  6 e pi p 4/16/2017 7:23 AM

12 Delaunay Triangulation
Dual graph of Voronoi Diagram

13 Delaunay Triangulation
Dual graph Nodes: site points Edges: “neighboring” sites in VD Properties Planar graph Linear complexity 4/16/2017 7:23 AM

14 Delaunay Properties DT is the straight-line dual of VD.
DT is a triangulation if no four sites are cocircular. Each face of DT corresponds to a vertex of VD. Each edge of DT corresponds to an edge of VD. Each node of DT corresponds to a cell of VD. The boundary of DT is the convex hull of the sites. The interior of each face of DT contains no sites. 2. Triangulation means that every face is a triangle. So, if there are any 4 sites cocircular, DT should be called as DG coz it is no more a triangulation. Each face of DT is called a Delaunay triangles. 4/16/2017 7:23 AM

15 Voronoi Properties Each Voronoi cell is convex.
The cell of pi is unbounded iff pi is on the convex hull of the sites. [c.f. D6] If v is a Voronoi vertex at the junction of p1, p2 and p3, then v is the center of the circle C(v) determined by p1, p2 and p3. C(v) is the circumcircle for the Delaunay triangle corresponding to v. The interior of C(v) contains no sites. [c.f. D7] If pi is a nearest neighbor to pj, then pipj is an edge of DT. If there is some circle through pi and pj that contains no other sites, then pipj is an edge of DT. D6 – boundary of DT is the convex hull of the sites D7 – the interior of each face of DT contains no sites 4/16/2017 7:23 AM

16 Voronoi Vertex A Voronoi vertex is an intersection of 3 (or more) segments, each equidistant from a pair of sites A point q is a Voronoi vertex iff its largest empty circle centered at q touches at least 3 (or more) sites pk pi q pj 4/16/2017 7:23 AM

17 Voronoi Edge A Voronoi edge is a subset of locus of points equidistant from pi and pj A point q lies on a Voronoi edge between sites pi and pj iff its largest empty circle centered at q touches only pi and pj q pi pj 4/16/2017 7:23 AM

18 Algorithms To compute a Voronoi Diagram

19 Computing Voronoi Diagram
Half Plane Intersection O(n2 log n) Sweep Line Algorithm O(n log n) Incremental Construction O(n2) 4/16/2017 7:23 AM

20 Half-Plane Intersection
For each site pi, Compute the common intersection of the half- planes h(pi, pj), with j≠i 4/16/2017 7:23 AM

21 Half-Plane Intersection
For each site pi, Compute the common intersection of the half- planes h(pi, pj), with j≠i 4/16/2017 7:23 AM

22 Half-Plane Intersection
For each site pi, Compute the common intersection of the half- planes h(pi, pj), with j≠i O(nlogn) time per Voronoi cell O( n2 log n ) in total 4/16/2017 7:23 AM

23 Incremental Construction
Incremental insertion Obtain VDn from VDn-1 Steps: Locate pi in some Voronoi cell of pj; Draw bisector between pi and pj; Expand boundary of Voronoi cell of pi; pj pi 4/16/2017 7:23 AM

24 Incremental Construction
Incremental insertion Obtain VDn from VDn-1 Steps: Locate pi in some Voronoi cell of pj; Draw bisector between pi and pj; Expand boundary of Voronoi cell of pi; pj pi 4/16/2017 7:23 AM

25 Incremental Construction
Incremental insertion Obtain VDn from VDn-1 Steps: Locate pi in some Voronoi cell of pj; Draw bisector between pi and pj; Expand boundary of Voronoi cell of pi; pj pi 4/16/2017 7:23 AM

26 Incremental Construction
Incremental insertion Obtain VDn from VDn-1 O(n) time per point insertion O(n2) in total Demo 4/16/2017 7:23 AM

27 General Sweep Line Framework
Sweep a horizontal line (sweep line) from top to bottom over the plane Incremental construction Maintain unchanged information Handle changes at certain special points (event points) l The strategy in a plane sweep framework is to sweep a horizontal line from top to bottom over the plane. 4/16/2017 7:23 AM

28 Fortune’s Algorithm Problems: What to maintain? Intersections?
Beach line unchanged information – Distance l 4/16/2017 7:23 AM

29 Beach Line Sequence of Parabolic arcs breakpoints lie on Voronoi edges
Set of points equidistant from nearest site above sweep line & sweep line itself breakpoints lie on Voronoi edges How to store it?? Sites consist of the line l breakpoint Equidistance arc 4/16/2017 7:23 AM

30 A visual implementation of Fortune's Voronoi algorithm
Fortune’s Algorithm Demo A visual implementation of Fortune's Voronoi algorithm Notice that at some particular point, a new parabolic arc may appear and at some other particular point, a parabolic are may shrink to a point and then disappear. We call those points as event points. 4/16/2017 7:23 AM

31 Events needed to be Handled – Site Event
When the sweep line reaches a new site… l We first consider the events where a new arc appears on the beach line. 4/16/2017 7:23 AM

32 Events needed to be Handled – Site Event
When the sweep line reaches a new site… l The parabola defined by this site is at first a vertical line segment connecting the new site to the beach line. Think about it as a parabola with zero width. 4/16/2017 7:23 AM

33 Events needed to be Handled – Site Event
When the sweep line reaches a new site…  A new arc appears l As the sweep line is moving downward, the new parabola get wider and wider. We call such an event a site event where a new site is encountered. What happens to the VD at a site event? Two new breakpoints appear. In fact, the new breakpoints coincide at first, and then move in opposite directions to trace out the same Voronoi edge. So, at a site event, a new arc appears on the beach line and a new Voronoi edge starts to be traced out. It is proven that this is the only way where a new arc can appear on the beach line. 4/16/2017 7:23 AM

34 Handling Site Events Find where it projects on beach line
Insert its arc in proper position in the list of beach line Find the arc vertically above the new site point. 4/16/2017 7:23 AM

35 Events needed to be Handled – Circle Event
When the sweep line encounters the bottom of an empty circle touching 3 or more sites… pi pj pk l Another type of event is where an existing arc of the beach line shrinks to a point and then disappears. When the sweep line is approaching the bottom of an empty circle, an arc is shrinking at the meantime. 4/16/2017 7:23 AM

36 Events needed to be Handled – Circle Event
When the sweep line encounters the bottom of an empty circle touching 3 or more sites…  An arc disappears pi pj pk y When the sweep line arrives at the bottom of the empty circle, the beach line touches the center of the circle and the arc shrinks to a point. After that, as the sweep line move downwards, that arc disappears. Also notice that when an arc disappears from the beach line and two breakpoints meet, two Voronoi edges meet together at a Voronoi vertex. We call such event as a circle event where the sweep line reaches the lowest point of a circle through 3 site points. Also, it is proved that this is the only way where an existing arc can disappear from the beach line. l 4/16/2017 7:23 AM

37 Handling Circle Events
Remove pj from beach line Create a Voronoi vertex y Center of empty circle is a Voronoi vertex Tie two Voronoi edges into y Create a Voronoi edge between pi and pk 4/16/2017 7:23 AM

38 Running Time Analysis How many arcs in beach line? How many events?
Each site split at most 1 existing arc into 2  At most 2n-1 arcs How many events? Site events O(n) – number of sites Circle events O(n) – number of arcs 4/16/2017 7:23 AM

39 RUNNING TIME ANALYSIS – DATA STRUCTURE
Beach line – sites that consist of the line  A binary search tree Event queue  A priority queue Where the priority of an event is its y-coordinate. It stores the upcoming events that are already known. 4/16/2017 7:23 AM

40 RUNNING TIME ANALYSIS – SITE EVENT
Find where it projects on beach line O(log n) Insert its “arc” in proper position in the list of beach line O(1) 4/16/2017 7:23 AM

41 RUNNING TIME ANALYSIS – CIRCLE EVENT
Remove pj from beach line O(log n) Create a Voronoi vertex y O(1) Tie two Voronoi edges into y Create a Voronoi edge between pi and pk 4/16/2017 7:23 AM

42 Total Running Time Each site/circle event handler O(log n)
At most O(n) site and circle events  O(n log n) total running time 4/16/2017 7:23 AM

43 Is Fortune’s Algorithm Optimal?
Sorting n real numbers is reducible to computing Voronoi diagrams  Lower bound O(n log n) Fortune’s algorithm is optimal! 4/16/2017 7:23 AM

44 Summary VD is a useful planar subdivision of a discrete point set
VD has linear complexity/size O(n) edges and O(n) vertices Can be constructed in O(n log n) time Fortune’s algorithm (optimal) 4/16/2017 7:23 AM

45 Questions ?? THANK YOU

46 Special Cases Collinear sites Co-circle sites v

47 Linear Complexity – proof
Case 1: collinear |v| = 0, |e| = n – 1


Download ppt "Computational Geometry -- Voronoi Diagram"

Similar presentations


Ads by Google