Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
Voronoi Diagrams:Solving the Post Office Problem
Discrete and Computational GeometryWS 2015/16
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
The Post Office Problem
Goal: A data structure that solves this problem efficiently.
What is the closest post office for a given position?
2
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
The Post Office Problem
First: Partition into regions with the same answer.
What is the closest post office for a given position?
2
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
The Post Office Problem
Simplest Case: Just two post offices p1 and p2
p1
p2
b(p1, p2)
• Regions bounded by the bisector b(p1, p2) of p1 and p2.
• Region of p1: closed halfspace H(p1, p2) containing p1.
H(p1, p2)
2
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
The Post Office Problem
General: Set P ={p1, . . . , pn} of n post office points in lR2
• Voronoi Cell VP (pi): all points of lR2 that are at leastas close to pi as to any other point of P .
pi
p1
p2
p3
p4
p5
VP (pi)
2
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
The Post Office Problem
General: Set P ={p1, . . . , pn} of n post office points in lR2
• Voronoi Cell VP (pi): all points of lR2 that are at leastas close to pi as to any other point of P .
Observation:◦ VP (pi) is the intersection of all halfspaces H(pj , pi)
with i ∈ {1, . . . , n}\{j}◦ VP (pi) is convex and possibly unbounded
• Voronoi Diagram VD(P ): subdivision of lR2 induced bythe voronoi cells VP (pi), for i = 1, . . . , n.
• pi, pj neighbors in VD(P ): VP (pi) and VP (pj) sharean edge in VD(P )
2
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
The Post Office Problem
General: Set P ={p1, . . . , pn} of n post office points in lR2
Note: inside a cell of VD(P ): one unique closest point.2
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
The Post Office Problem
General: Set P ={p1, . . . , pn} of n post office points in lR2
Question: on an edge of VD(P )? ⇒ two closest points2
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
The Post Office Problem
General: Set P ={p1, . . . , pn} of n post office points in lR2
Question: on a vertex of VD(P )? ⇒ ≥ 3 closest points2
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
These Circles look familiar...
3
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
These Circles look familiar...
3
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
These Circles look familiar...
3
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
These Circles look familiar...
3
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
Voronoi Diagram / Delaunay Graph
• The Voronoi diagram VD(P ) of a point set P is unique.• VD(P ) is the dual of the Delaunay graph DG(P ).• If P has no 4 co-circular points then VD(P ) is the dual
of the unique Delaunay triangulation DT(P ).• The unbounded cells of VD(P ) contain the extreme
vertices of P .• The duals of the unbounded edges of VD(P ) form the
convex hull of the point set.• An edge of DT(P ) might not intersect its dual edge in
VD(P ) and a triangle in DT(P ) might not contain itsdual vertex in VD(P ), independent of whether or notDT(P ) is unique.
• VD(P ) has O(n) vertices, edges, and regions.
• An edge of DT(P ) might not intersect its dual edge inVD(P ) and a triangle in DT(P ) might not contain itsdual vertex in VD(P ), independent of whether or notDT(P ) is unique.
4
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
Constructing Voronoi Diagrams
One approach: Construct from Delaunay Triangulation
5
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
Constructing Voronoi Diagrams
Vertices: Circumcenters of Delaunay triangles
5
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
Constructing Voronoi Diagrams
Vertices: Circumcenters of Delaunay triangles
5
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
Constructing Voronoi Diagrams
Edges: (parts of) bisectors of Delaunay edges.
5
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
Constructing Voronoi Diagrams
Edges: (parts of) bisectors of Delaunay edges.
5
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
Constructing Voronoi Diagrams
One approach: Construct from Delaunay Triangulation⇒ Time: O(n log n) expected
5
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
Constructing Voronoi Diagrams
`
Different idea: Plane sweep: Maintain VD left of `.
5
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
Constructing Voronoi Diagrams
`
Problem: How to discover new Voronoi regions in time?
5
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
Constructing Voronoi Diagrams
Solution: See sweep-line as additional line-shaped site.
`5
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
Constructing Voronoi Diagrams
⇒ Left of `: Voronoi diagram of swept points and `.
`5
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
Constructing Voronoi Diagrams
`
⇒ Left of `: Voronoi edges and a Wavefront of parabolic arcs.
5
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
Constructing Voronoi Diagrams
⇒ Left of `: Voronoi edges and a Wavefront of parabolic arcs.
`5
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
Constructing Voronoi Diagrams
⇒ Left of `: Voronoi edges and a Wavefront of parabolic arcs.
`5
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
Constructing Voronoi Diagrams
⇒ Left of `: Voronoi edges and a Wavefront of parabolic arcs.
`
Point scanned: spike event
5
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
Constructing Voronoi Diagrams
⇒ Left of `: Voronoi edges and a Wavefront of parabolic arcs.
`
Parabula vanishes: site event
5
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
Constructing Voronoi Diagrams
⇒ Left of `: Voronoi edges and a Wavefront of parabolic arcs.
`5
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
Constructing Voronoi Diagrams
⇒ Left of `: Voronoi edges and a Wavefront of parabolic arcs.
`5
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
Constructing Voronoi Diagrams
⇒ Left of `: Voronoi edges and a Wavefront of parabolic arcs.
5
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
Constructing Voronoi Diagrams
⇒ Time: O(n log n) deterministicDifferent idea: Plane sweep: Maintain VD left of `.
5
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
Constructing Voronoi Diagrams
⇒ Time: O(n log n) deterministicDifferent idea: Plane sweep: Maintain VD left of `.
⇒ DT in O(n log n) deterministic!
5
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
The Post Office Problem
Goal: A data structure that solves this problem efficiently.
What is the closest post office for a given position?
6
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
The Post Office Problem
What is the closest post office for a given position?
Theorem: Given a triangulation T for a set P of n pointsin lR2, one can build in O(n) time an data structure of sizeO(n) that allows for any query point q ∈ conv(P ) to tofind in O(log n) time a triangle from T containing q.
For example: Kirkpatrick’s Hierarchy
Corollary: The postoffice problem can be solved withO(n log n) preprocessing time and O(log n) query timewith a data structure that uses O(n) space.
• add Bounding box to VD(P )• triangulate regions• apply the theorem
6
Institute of Software Technology
Birgit Vogtenhuber January 2016 Voronoi Diagrams
More About Voronoi Diagrams
• . . . exist also in higher dimensions• . . . are used also for other objects than points• . . . can be defined also for other metrics than the. . . euclidean distance
Voronoi Diargrams . . .
Thank you for your attention!
And there’s much more to know about them . . .
. . . but: not anymore in this lecture. See for example thebook Voronoi Diagrams and Delaunay Triangulations byAurenhammer, Klein, Lee.
7