Voronoi Diagram Lecture Slide

Author
nilanjanbhattacharya 
Category
Documents

view
215 
download
0
Embed Size (px)
Transcript of Voronoi Diagram Lecture Slide

7/31/2019 Voronoi Diagram Lecture Slide
1/60
Voronoi Diagram
Subhas C. NandyAdvanced Computing and Microelectronics Unit
Indian Statistical Institute
Kolkata 700108

7/31/2019 Voronoi Diagram Lecture Slide
2/60
Viewpoint 1: Locate the nearest dentist.Viewpoint 2: Find the service area of potential customers for each dentist.

7/31/2019 Voronoi Diagram Lecture Slide
3/60
Voronoi Diagram

7/31/2019 Voronoi Diagram Lecture Slide
4/60
Formal Definition
P A set of ndistinct points in the plane.
VD(P) a subdivision of the plane into ncells such that
each cell contains exactly one site, if a point qlies in a cell containing pi then
d(q, pi) < d(q, pj) for all pi P, j i.

7/31/2019 Voronoi Diagram Lecture Slide
5/60
Computing the Voronoi Diagram
Input: A set of points (sites)Output: A partitioning of the plane into regions of equal nearest neighbors

7/31/2019 Voronoi Diagram Lecture Slide
6/60
Voronoi Diagram Animations
Java applet animation of the
Voronoi Diagram by:
Christian Icking, Rolf Klein,Peter Kllner, Lihong Ma(FernUniversitt Hagen)

7/31/2019 Voronoi Diagram Lecture Slide
7/60
Characteristics of the Voronoi Diagram
(1) Voronoi regions (cells) are bounded by line segments.
Special case :
Collinear points
Theorem : Let Pbe a set of npoints (sites) in the plane.If all the sites are collinear, then Vor(P) consist of n1 parallel lines and ncells.Otherwise, Vor(P) is a connected graph and its edges are either linesegments or halflines.
e
pi pj
pk
h(pi,pj)
h(pj,pk)If pi, pjare not collinear with pk, thenh(pi, pj) and h(pj, pk) can not be parallel!

7/31/2019 Voronoi Diagram Lecture Slide
8/60
Characteristics of the Voronoi Diagram
Each vertex (corner) of VD(P) has degree 3
The circle through the three points definesa vertex of the Voronoi diagram, and itdoes not contain any other point
The locus of the center of a largest
empty circles passing throughonly a pair of points pi, pjPdefines an edge
The locus of the center of largest
empty circles passing throughonly one points in Pdefines a cell
The Voronoi region of a point isunbounded iff the point is a
vertex of the convex hull ofthe point set.
Assumption: No 4 points are cocircular.

7/31/2019 Voronoi Diagram Lecture Slide
9/60
Degenerate Case with
no bounded cells!Size of the Voronoi Diagram:
V(p) can have O(n) vertices!

7/31/2019 Voronoi Diagram Lecture Slide
10/60
Combinatorial Complexity of Voronoi Diagram
Theorem: The number of vertices in the Voronoi diagram of a setof npoints in the plane is at most 2n5and the number of edgesis at most 3n6.
epi
Proof:
1. Connect all Halflines with fictitious
point
2. 2. Apply Euler`s formula:v e + f = 2
For VD(P) + :
v =number of vertices of VD(P) + 1e =number of edges of VD(P)f =number of sites of VD(P) = n

7/31/2019 Voronoi Diagram Lecture Slide
11/60
Proof (Continued)
Each edge in VD(P) +has exactly two vertices andeach vertex of VD(P) +has at least a degree of 3:
sum of the degrees of all vertices of Vor(P) += 2 ( # edges of VD(P) )
3 (# vertices of VD(P) + 1 )
Number of vertices of VD(P) = vp
Number of edges of VD(P) = ep
We can apply: (vp+ 1) ep+ n = 2
2 ep3 (vp+ 1)
2 ep3 ( 2 + ep n)
= 6 + 3ep 3n
3n 6ep

7/31/2019 Voronoi Diagram Lecture Slide
12/60
Voronoi Diagram and Delaunay
TessellationDelaunay triangulation DT(S):A tessellation obtained by connecting a pair
of pointsp.q Swith a line segment if a
circle Cexists that passes throughp and q and
does not contain any other site ofSin its
interior or boundary.
The edges of DT(S) are calledDelaunay
edges.
1. Two points in S are joined by a Delaunay edge if their Voronoi regions are
adjacent.
2. If no four points of S are cocircular then DT(S) the
dual of the Voronoi diagram V(S) is a triangulation of S DT(S) is called the
Delaunay triangulation.
3. Three points of S give rise to a Delaunay triangle if their circumcircle does
not contain a point of S in its interior.

7/31/2019 Voronoi Diagram Lecture Slide
13/60
Construction of Voronoi Diagram
A simple algorithm
Given an algorithm for computingthe intersection of halfplanes, one
can construct the Voronoi regionof each point separately.
This needs O(n2 log n) time

7/31/2019 Voronoi Diagram Lecture Slide
14/60

7/31/2019 Voronoi Diagram Lecture Slide
15/60
Construction of Voronoi Diagram
using divide and conquerInput: A set of points (sites)
Output: A partitioning ofthe plane into regions ofequal nearest neighbors.

7/31/2019 Voronoi Diagram Lecture Slide
16/60
Divide and conquer: Divide Step
Divide: Divide the point set into two halves

7/31/2019 Voronoi Diagram Lecture Slide
17/60
Divide and Conquer: Conquer Step
Conquer: Recursively compute the Voronoi diagrams for the smallerpoint sets.
Abort condition: Voronoi diagram of a single point is the entire plane.

7/31/2019 Voronoi Diagram Lecture Slide
18/60
Divide and Conquer: Merge
Merge the diagrams by a (monotone) sequence of edges

7/31/2019 Voronoi Diagram Lecture Slide
19/60
The Result
The finished Voronoi Diagram
Running time: With ngiven points is O(nlog n)

7/31/2019 Voronoi Diagram Lecture Slide
20/60
Example

7/31/2019 Voronoi Diagram Lecture Slide
21/60
Fortunes line sweep algorithm
It is an incremental construction
A horizontal line is swept among the sites from top to bottom
It maintains portion of Voronoi diagram which does notchange due to the appearance of new sites below sweepline;
It keeps track of incremental changes of the Voronoi diagramthat is caused for the appearance of each site on thesweep line.

7/31/2019 Voronoi Diagram Lecture Slide
22/60
Construction of Voronoi diagram
What is the invariant we are looking for?
It maintains a representation of the locus of the point q that
are at the same distance from some sitepi above the sweep
line and the line itself.
ev
pi
Sweep Line
q

7/31/2019 Voronoi Diagram Lecture Slide
23/60
Construction of Voronoi diagram (contd.)
Which points are closer to a site above the sweep line than to thesweep line itself?
The set of parabolic arcs form a beachline that bounds the
locus of all such points
Break points trace out Voronoi edges
Sweep Line
pi
q
Equidistance

7/31/2019 Voronoi Diagram Lecture Slide
24/60
Construction of Voronoi diagram (contd.)
Sweep Line
piq
Arcs flatten out as sweep line
moves down
Eventually, the middle arc disappears
Sweep Line
piq

7/31/2019 Voronoi Diagram Lecture Slide
25/60
Construction of Voronoi diagram (contd.)
Thus, we have detected a circle that contains no site in Pand touches3 or more sites.
Sweep Line
pi
q
Voronoi vertex!

7/31/2019 Voronoi Diagram Lecture Slide
26/60
Construction of Voronoi diagram (contd.)
When a new site appears on the sweep line,a new arc appears on the beach line
Sweep Line
pi
q
Equidistance

7/31/2019 Voronoi Diagram Lecture Slide
27/60
Beach Line properties
Voronoi edges are traced by the break points as the sweep linemoves down.
Emergence of a new break point (due to the formation of a new arcor a fusion of two existing break points) identifies a new edge
Voronoi vertices are identified when two break points meet (fuse).Decimation of an old arc identifies new vertex

7/31/2019 Voronoi Diagram Lecture Slide
28/60
Data Structures
Current state of the Voronoi diagram
Doubly linked list (D) containing halfedges, edges, vertices and cellrecords
Current state of the beach line (T)
Keeps track of break points, and the arcs currently on beach line
Current state of the sweep line (Event queue)
Priority queue on decreasing ycoordinate

7/31/2019 Voronoi Diagram Lecture Slide
29/60
Doublylinked list (D)
A simple data structure that allows an algorithm to traverse aVoronoi diagrams vertices, edges and cells
e
v
Cell(pi)
Consider edges as a pair ofunidirectional halfedges
A chain of counterclockwisehalfedges forms a cell
Define a halfedges twin to
be its opposite halfedge ofthe same Voronoi edge

7/31/2019 Voronoi Diagram Lecture Slide
30/60
Beach Line Data Structure (T)
pi pj pk pl
pipj
pkpl
l
It is a balanced binary search tree
Internal nodes represent break points between two arcs
Leaf nodes represent arcs, each arc in turn is represented by the site thathas generated it
It also contains a pointer to a potential circle event

7/31/2019 Voronoi Diagram Lecture Slide
31/60
Event Queue (Q)
Consists of
Site Events (when the sweep line encounters a new site point)
Circle Events (when the sweep line encounters the bottomof an emptycircle touching 3 or more sites).
It is prioritized with respect to the decreasing order of the ycoordinateof the events
Sit E t

7/31/2019 Voronoi Diagram Lecture Slide
32/60
Site Event
ll
Original arc above the new site is broken into two
Number of arcs on beach line is O(n)
A new arc appears when a new site appears
Ci l E t

7/31/2019 Voronoi Diagram Lecture Slide
33/60
Circle Event
Sweep line helps determine that the circle is indeed empty.
Circle Event!
Sweep Line
piq
Voronoi vertex!
An arc disappears whenever an empty circle touches three or moresites and is tangent to the sweep line.
V i di A diff t F l ti

7/31/2019 Voronoi Diagram Lecture Slide
34/60
Voronoi diagram: A different Formulation
1. Project each point pi on the surface of a unit paraboloid
2. Compute the lower convex hull of the projected points.
Result: Given S= {pii=1, 2, n} in the plane (no 4 points cocircular) and given3 points p, q, rS, the triangle pqr is a triangle of Delauney triangulation if pqris a face of the lower convex hull of the projected points S
Conclusion: The projection of this convex hull gives the Delauney Triangulationof the point set.
V i di A diff t F l ti

7/31/2019 Voronoi Diagram Lecture Slide
35/60
Voronoi diagram: A different Formulation
1. Project each point pi on the surface of a unit paraboloid
2. Draw tangent planes of the paraboloid at every projected point.3. Compute the upper envelope of these planes.
Result: The projection of this upper envelope gives the Voronoi diagram
of the point set.
V i di i L t

7/31/2019 Voronoi Diagram Lecture Slide
36/60
Voronoi diagram in Laguerre geometry
Define the distance of two points p= (x1, y1, z1) and q= (x2, y2, z2) in R3 is
D2(p,q) = (x1 x2)2 + (y1 y2)
2 (z1 z2)2
In Laguerre geometry
A point (x, y, z) is mapped to a circle in the Euclidean plane with center (x, y)and radius z
The distance between a pair of points in R3 corresponds to the length of thecommon tangent of the corresponding two circles
The distance of a point p= (x, y) from a circle Ci(Qi, ri) with center Qi = (xi, yi)
and radius ri= length of the tangent segment of the circle Ci(Qi, ri) from point p= (x, y)= DL
2(Ci,p) = (xi x)2 + (yi y)
2ri2
DL2(Ci,p) is negative, zero or positive depending on whether p lies inside, on or
outside Ci
Voronoi diagram in Laguerre geometry

7/31/2019 Voronoi Diagram Lecture Slide
37/60
Voronoi diagram in Laguerre geometry
Radical axis:Locus of the points equidistantfrom two circles Ci and Cj.
Radical center:If the centers of three circles
are not collinear, then the radical axes of(Ci and Cj), (Cj and Ck) and (Ci and Ck)meet at a point.
Voronoi diagram in Laguerre geometry

7/31/2019 Voronoi Diagram Lecture Slide
38/60
Voronoi diagram in Laguerre geometry
Voronoi Polygon:Suppose ncircles Ci(Qi, ri) are given in the plane.Distance of Ci and a point pis defined by DL(Ci,p),Then the Voronoi polygon V(Ci) for circle Ci is
V(Ci) = {p R2
 DL2
(Ci,p) < DL2
(Cj,p)}
Voronoi polygons partition the whole plane
V(Ci) is always convexV(Ci) may be empty if Ci is contained in
the union of other circles
A circle whose Voronoi polygon is nonempty is called substantial circle
A circle whose Voronoi polygon is emptyis called trivial circle(C
3is a trivial circle)
Voronoi diagram in Laguerre geometry

7/31/2019 Voronoi Diagram Lecture Slide
39/60
Voronoi diagram in Laguerre geometry
Voronoi Polygon:Suppose ncircles Ci(Qi, ri) are given in the plane.Distance of Ci and a point pis defined by DL(Ci,p),Then the Voronoi polygon V(Ci) for circle Ci is
V(Ci) = {p R2
 DL2
(Ci,p) < DL2
(Cj,p)}
A circle that intersects its Voronoi polygonis said to be proper; otherwise it is
improper.
A trivial circle is necessarily improper
If V(Ci) is nonempty and unbounded thenthe center of C
iis at a corner of the
convex hull of the centers of Cis.
A divide and conquer method for constructing V(C)is described by Imai, Iri and Murota, 1985.
Use of Voronoi Diagram

7/31/2019 Voronoi Diagram Lecture Slide
40/60
Use of Voronoi Diagram
Search for nearest neighbourInput: A fixed (static) set P of
npoints in the plane, anda query point p
Output: Nearest neighbour ofpin P
Solution Construct the Voronoi diagram
for Pin time O(nlog n) Solve the point location problem
in O(log n) time.
Use of Voronoi Diagram (contd )

7/31/2019 Voronoi Diagram Lecture Slide
41/60
Use of Voronoi Diagram (contd.)
Closest pair of points:
Inspect all the edges list ofVor(P) and determinethe minimally separated pair
Largest empty circle:Each Voronoi vertex represents
the center of a maximal emptycircle. Find one having maximumradius.
Base station placement problem

7/31/2019 Voronoi Diagram Lecture Slide
42/60
Base station placement problem
Problem: Place kbase stations of same power in a convex region
Method:
Initial Configuration:Randomly distribute k points inside theregion
Iterative Step:
1. Compute the Voronoi diagram
2. Compute the minimum enclosing circleof each Voronoi polygon
3. Move each point to the center of itscorresponding circle.
Termination Condition:
The radius of each circle is almost same.
Furthest Point Voronoi Diagram

7/31/2019 Voronoi Diagram Lecture Slide
43/60
Furthest Point Voronoi Diagram
V1(pi) : the set of point ofthe plane farther frompi than from any other
site
Vor1(P) : the partition of
the plane formed bythe farthest pointVoronoi regions, theiredges, and vertices
Furthest Point Voronoi Region

7/31/2019 Voronoi Diagram Lecture Slide
44/60
Furthest Point Voronoi Region
Construction of V1(7)
Property
The farthest point Voronoiregions are convex
Furthest Point Voronoi Region

7/31/2019 Voronoi Diagram Lecture Slide
45/60
Furthest Point Voronoi Region
PropertyIf the farthest point Voronoiregion of pi is non empty then
pi is a vertex of conv(P)

7/31/2019 Voronoi Diagram Lecture Slide
46/60
Farthest point Voronoi edges and vertices

7/31/2019 Voronoi Diagram Lecture Slide
47/60
Farthest point Voronoi edges and vertices
V1(1)
V1(4)
x
V1(2)
V1(4)
V1(7)
edge : set of points equidistantfrom 2 sites and closerto all the other sites
vertex : point equidistantfrom at least 3 sites andcloser to all the other sites
Application: Smallest enclosing circle

7/31/2019 Voronoi Diagram Lecture Slide
48/60
Application: Smallest enclosing circle
V1(2)
V1(4)
V1(7)
Order2 Voronoi diagram

7/31/2019 Voronoi Diagram Lecture Slide
49/60
Order 2 Voronoi diagram
V(pi,pj) : the set of points
of the plane closerto each of pi and pjthan to any other site
PropertyThe order2 Voronoiregions are convex
Construction of V(3,5)

7/31/2019 Voronoi Diagram Lecture Slide
50/60
( , )
Order2 Voronoi edges

7/31/2019 Voronoi Diagram Lecture Slide
51/60
g
Question
Which are the regionson both sides of cp(s,t) ?
=> V(p,s) and V(p,t)
c3(1,2)
V(2,3)
V(1,3)
edge : set of centers of
circles passing through2 sites s and t andcontaining 1 site p
=> cp(s,t)
Order2 Voronoi vertices

7/31/2019 Voronoi Diagram Lecture Slide
52/60
=> up(Q) or u (Q)
u5(2,3,7)
u
(3,6,7,5)
vertex : center of a circlepassing through at least3 sites and containing
either 1 or 0 site
Order2 Voronoi vertices

7/31/2019 Voronoi Diagram Lecture Slide
53/60
vertex : center of a circlepassing through at least
3 sites and containingeither 1 or 0 site
=> up(Q)
u5(2,3,7)
or u (Q)
QuestionWhich are the regionsincident to up(Q) ?
=> V(p,q) with q Q
V(5,2)
V(5,7)
V(5,3)
Order2 Voronoi vertices

7/31/2019 Voronoi Diagram Lecture Slide
54/60
vertex : center of a circlepassing through at least3 sites and containingeither 1 or 0 site
=> up(Q) or u (Q) u
(3,6,7,5)
QuestionWhich are the regionsincident to up(Q) ?
=> V(p,q) with q Q
QuestionWhich are the regions
incident to u (Q) ?=> V(q,q) with q and q consecutive on the circle circumscribed to Q
V(6,7)
V(5,7)
V(3,5)
V(3,6)
Orderk Voronoi Diagram

7/31/2019 Voronoi Diagram Lecture Slide
55/60
TheoremThe size of the orderkdiagrams is O(k(nk))
TheoremThe orderk diagrams
can be constructed fromthe order(k1) diagramsin O(k(nk)) time
CorollaryThe orderk diagrams canbe iteratively constructed
in O(n log n + k2
(nk)) time
Voronoi diagram of weighted points

7/31/2019 Voronoi Diagram Lecture Slide
56/60
S Set of points in 2D
w(p) weight attached with the point p S
dw(x,p) = de(x,p)/w(p) weighted distance of a point x from p S
Weighted Voronoi diagram
WVD(S) the subdivision of the planesuch that
region(p) = {x dw(x,p) < dw(x,q) q S
If a point xfalls in region(p), then pisthe weighted nearest neighbor of x.
Voronoi diagram of weighted points

7/31/2019 Voronoi Diagram Lecture Slide
57/60
S= {p, q} be two weighted points in 2D with w(p) < w(q).
Then dom(p,q) = the region of influence of pis the closed disk withcenter at (w2(p) pw2(q) q)/(w2(p) w2(q)),
and radius (w(p) w(q) de(p,q))/(w2(p) w2(q))dom(q,p) = the region of influence of q is the closed complement of this disk.
For a set Sof more than 2 points region(p) =q
S\{p}
dom(p,q)
Observations:
Let p, q, r be three weighted points. Then there are at most two pointscommon to sep(p,q), sep(q,r) and sep(p,r);
A point common to two of them is common to all of them.
region(p) may not always be connected.
region(p) may be empty for some point p.
Weighted Voronoi diagram:Combinatorial Complexity

7/31/2019 Voronoi Diagram Lecture Slide
58/60
Combinatorial Complexity
Let Sdenote the set of nweighted points in the plane. Then WVD(S)
contains (n2) faces, edges and vertices
Let S be a set of n weighted points in the plane. Then a region maybe bounded by O(n) edges.
Algorithm for constructing weighted Voronoi diagram:
See Aurenhammer and Edelsbrunner, Pattern Recognition, 1985
Application (in mobile communication):
Power of one base station is more than that of others. Now given theposition of a mobile terminal where from it will get the service.

7/31/2019 Voronoi Diagram Lecture Slide
59/60
Voronoi diagram for line segments

7/31/2019 Voronoi Diagram Lecture Slide
60/60
g g
Moving a disk from sto tin the presence of barriers