Title: CMPUT 498 Voronoi Diagrams
1CMPUT 498Voronoi Diagrams
- Lecturer Sherif Ghali
- Department of Computing Science
- University of Alberta
2Trading Areas
- Assumptions
- Total cost cost of item transportation cost
- Transportation cost k Euclidean distance
- Consumers pursue cheapest option
3Definitions
- p and q are two sites
- P set of sites
- Vor(P) Voronoi diagram of P
- V(pi) Voronoi cell of site pi
- In Vor(p,q)
- h(p,q) halfplane that contains p
- h(q,p) halfplane that contains q
q
p
h(q,p)
h(p,q)
4A Voronoi cell is the intersection of halfplanes
5Characterisation of Vor(P)
- What is P?
- collinear set of points
- Vor(P) n-1 parallel lines
- otherwise
- Edges of Vor(P) are either segments or halflines
- Vor(P) is connected
6Upper bound on complexity of Vor(P)
- Argument complexity of one cell is linear in n
(where P n) ? complexity of Vor(P) is
quadratic in n - Is this tight?
7Tight upper bound on complexity of Vor(P)
- n Number of sites
- ne Number of Voronoi edges ? 2n-5
- nv Number of Voronoi vertices ? 3n-6
?
?
- Every edge has degree 2
- Every vertex has degree at least 3
- ?
?
8Computing the Voronoi diagram
- for each site
- complexity O(n log n) / Voronoi cell
- O(n2 log n) / Voronoi diagram
- The sweep algorithm (Fortunes) takes O(n log n)
time, - which is optimal
9Plane sweep?
- Apply the plane sweep paradigm
- Maintain the Voronoi regions above the sweep line
for the sites above the line - But that doesnt work
- A not-yet-crossed site induces a cell to appear
above the line - A Voronoi vertex is crossed by the sweep line
before the corresponding site is reached - Solution
- Find an answer to
- What is the shape of the portion above the sweep
line for which we know for sure the Voronoi
regions (for a given location of the sweep line)
10Plane sweep?
we know the Voronoi cells here
1
sites already crossed
we cant yet know anything about the Voronoi
cells here
2
sites yet to be crossed
we know nothing about the Voronoi cells here
Question What is the shape of and ?
1
2
11Plane sweep?
we couldnt know about this vertex (yet)
Question What is the shape of the region we know
about?
12Plane sweep?
- We have to take care of the worst-case scenario
- a site could be encountered anywhere
- what is the shape of
- and ?
1
2
13The beach line
- Observations
- The beach line is x-monotone
- The beach line breakpoints lie on edges of Vor(P)
14Event 1 - Site event
Beach line crosses a site
15Event 2 - Circle event
Existing arc shrinks to a point and disappears
16Detecting circle events
- Observations
- Circle events arise from consecutive triples of
arcs - Not each consecutive triple of arcs results in
circle event - A consecutive triple of arcs that results in a
circle event does not necessarily actually result
in one (false alarm)
17Recall DCEL
18Data structures for sweeping
- Representing the Voronoi diagram
- Winged-edge data structure D
- a.k.a. Doubly connected edge list
- Representing the beach line
- Balanced binary tree T
- Internal nodes represent beach
- line breakpoints
- Representing the events
- Priority queue Q
19Algorithm
20(No Transcript)
21(No Transcript)
22Reference
Chap. 7