Title: Design of Spatial Information Systems
1 DEPARTMENT OF COMPUTER SCIENCE UNIVERSITY OF
JOENSUU JOENSUU, FINLAND
- Design of Spatial Information Systems
- Lecture 11
- Voronoi diagrams
- Alexander Kolesnikov
2The post office problem
The trading areas of the capitals of the 12
provinces in the Netherlands.
3Voronoi diagrams Definition
- Let Pp1, p2, , pn be a set of n distinct
points in the - plane these points are the sites.
- Voronoi diagram of P is 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 pi, if
and only if - dist(q,pi) lt dist(q,pj)
- for each pj ?P with j?i.
4Voronoi diagrams Example
pj
q
pi
5Voronoi diagram Terms
Unbounded cell
Bounded cell
6Voronoi diagram for two sites
Perpendicular bisector for two sites.
7Voronoi diagram for collinear sites
Perpendicular bisector for 6 collinear sites.
8Voronoi diagram for non-collinear sites
.
?
.
.
Voronoi diagram for three non-collinear sites.
Do the lines intersect at the one point?
9Voronoi diagram for non-collinear sites
Voronoi diagram for four non-collinear sites
10Algorithms Survey
1) Plane intersect Complexity O(n2
logn) 2) Incremental algorithm Worst case
O(n2) 3) Divide-and-conquer Divide Step
O(n logn) Conquer Step O(n logn)
Total complexity O(n logn) 4) Plane sweep or
Fortunes algorithm (1985) Complexity
O(n logn)
11Plane intersect algorithm Main idea
Follow the mathematical description for
generating a Voronoi cell merge all half-planes
generated by the bisecting line between the site
pi and all other sites pj in the plane.
Vor(pi) merge H(pi,pj) for i!j where H(pi,pj)
is the half-plane between site pi and site pj.
12Plane intersect algorithm Example (1)
The 1st half-plane is found. The 2nd
half-plane is found.
13Plane intersect algorithm Example (2)
The 3rd half-plane is found. The 4th
half-plane is found.
Repeat the procedure for all sites.
14Incremental algorithm Main idea
- After the straightforward approach in the
previous algorithm, lets try to achieve some
efficiency by cutting out some redundancy. - Sort all sites along the increasing x-axis and
generate the first diagram. - Afterwards the sites are subsequently inserted
into the fringe of the diagram, minimizing
necessary cutting operations.
151. Incremental Algorithm
- Suppose that we have already built the Voronoi
diagram Vp-1, and would like to add a new sites
sp. - First, find the site, say si, whose Voronoi
polygon contains sp, and draw the perpendicular
bisector between sp and si, denoted by B(sp, si).
162. Incremental Algorithm
- The bisector crosses the boundary of V(si) at two
points, point x1 and point x2. Site sp is to the
left of the directed line segment x1x2. - The line segment x1x2 divides the Voronoi polygon
V(si) into two pieces, the one on the left
belonging to the Voronoi polygon of sp. - Thus, we get a Voronoi edge on the boundary of
the Voronoi polygon of si .
173. Incremental Algorithm
- Starting with the edge x1x2, expand the boundary
of the Voronoi polygon of sl by the following
procedure. The B(si, sl) crosses the boundary of
V(si) at x2, entering the adjacent Voronoi
polygon, say V(sj). - Therefore, next draw the B(si, sj), and find the
point, x3, at which the bisector crosses the
boundary of V(sj). - Similarly, find the sequence of segments of
perpendicular bisectors of s and the neighboring
sites until we reach the starting point x1.
184. Incremental Algorithm
- Let this sequence be (x1x2, x2x3, , xm-1xm,
xmx1). This sequence forms a CCW boundary of the
Voronoi polygon of the new site s. - Finally, we delete from Vp-1 the substructure
inside the new Voronoi polygon, and thus get Vp.
19. Example
20Example
21Example
22Example
23Example
O(n) per point insertion Total complexity O(n2)
24Fortunes algorithm Main idea
1) A cone with 45 degree angle is constructed
centered on each site in the plane. 2) A
slanted plane (45 degree angle) is now dragged
across the coordinate system. 3) The
intersection between the cones, when projected
onto the x-y plane defines the Voronoi lines.
When the angled plane moves across the x axis,
the intersection of the plane with the
individual cones (projected onto the x-y plane)
defines the intersection points of the
individual parabola curves, and thus the Voronoi
lines between the sites in the x-y
plane. Complexity O(n logn)
25Fortunes algorithm Main idea
A cone with 45 degree angle is constructed
centered on each site in the plane.
A slanted plane (45?) is now dragged across the
coordinate system
26Fortunes algorithm Demo
Beach line
http//www.diku.dk/hjemmesider/studerende/duff/For
tune
27Voronoi diagram ? ...
Once you have a Voronoi diagram for point set
P 1) How to get Convex Hull for the point set
P? Vor(P) ? CH(P) 2) Draw an edge
between each pair of points that share a Voronoi
edge Vor(P) ? Delaunay
triangulation
28Other names of ...
- Voronoi diagram, tessellation, polygons
- Dirichlet diagram, regions, tessellation
- Thiesen polygons, polytopes
- Descartes cosmic fragmentation
- Wigner-Seitz cells (metallurgy)
- Blum's transform (biological shape and visual
science) - Brown area potentially available to a tree
- Mead plant polygons