Maksym Zavershynskyi and Evanthia Papadopoulou present a sweepline algorithm for constructing higher order Voronoi diagrams of points and line segments in the plane. The algorithm uses a sweepline approach to incrementally construct the Voronoi diagram as the sweepline moves vertically downwards. It processes two types of events - site events when a new segment is encountered, and circle events when three wavefronts intersect. The algorithm runs in O(k^2n log n) time and O(kn) space, where k is the order of the Voronoi diagram and n is the number of input sites. It can also handle degenerate cases when segments share endpoints
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
A Sweepline Algorithm for Higher Order Voronoi Diagrams
1. Maksym Zavershynskyi
joint work with
Evanthia Papadopoulou
Università della Svizzera Italiana
Lugano, Switzerland
Supported in part by the Swiss National Science Foundation (SNF) grant 200021-127137.
Also by SNF grant 20GG21-134355 within the collaborative research project EuroGIGA/VORONOI of the European Science Foundation.
A Sweepline Algorithm for
Higher OrderVoronoi Diagrams
Tuesday, July 16, 2013
2. Nearest NeighborVoronoi Diagram
The nearest neighborVoronoi diagram is the
partitioning of the plane into regions, such that all
points within a region have the same closest site.
Tuesday, July 16, 2013
3. Higher OrderVoronoi Diagram
The order-kVoronoi diagram is the partitioning of
the plane into regions, such that all points within an
order-k region have the same k nearest sites.
V2({s1, s2}, S)
s1 s2
Tuesday, July 16, 2013
4. Related Work
• Structural complexity of the order-kVoronoi
diagram:
• for points [Lee’82]
• line segments [Papadopoulou&Zavershynskyi’12]
O(k(n − k))
O(k(n − k))
Tuesday, July 16, 2013
5. Related Work
• Iterative construction algorithm:
• Time
• Space
• Can be used to construct all order-iVoronoi
diagrams, for
O
k2
n log n
O
k2
(n − k)
i = 1, . . . , k
Tuesday, July 16, 2013
6. Construction Algorithms
Construction Time Reference
ChazelleEdelsbrunner’87
Clarkson’87
Aurenhammer’90
Mulmuley’91
Boissonnat et al.’93
Agarwal et al.’98
Chan’98
Ramos’99
O
n2
+ b log2
n
O
n1+
k
O
nk2
+ n log n
O
nk3
+ n log n
O
n log3
n + nk log n
O (n log n + nk log n)
O
n log n + nk2c log∗
k
O
nk2
log n
Tuesday, July 16, 2013
7. Construction Algorithms
Construction Time Reference
ChazelleEdelsbrunner’87
Clarkson’87
Aurenhammer’90
Mulmuley’91
Boissonnat et al.’93
Agarwal et al.’98
Chan’98
Ramos’99
O
n2
+ b log2
n
O
n1+
k
O
nk2
+ n log n
O
nk3
+ n log n
O
n log3
n + nk log n
O (n log n + nk log n)
O
n log n + nk2c log∗
k
O
nk2
log n
Expected
For Points!
Tuesday, July 16, 2013
8. Construction Algorithms
• Based on Fortune’s algorithm
• For points and line segments
• Deterministic
• Simple
• Easy to implement
Sweepline approach?
Tuesday, July 16, 2013
10. The Idea
• Consider horizontal line l
• Wave-curve w(s) is the locus of points equidistant
from l to s
Tuesday, July 16, 2013
11. • Let be the set of line segments that intersect the
upper halfplane.
• Consider an arrangement of wave-curves
The Idea
S
w(s), s ∈ S
Tuesday, July 16, 2013
12. The Idea
• Consider k-level Ak
• Lower envelope is 1-level
Ak
Tuesday, July 16, 2013
13. The Idea
• Consider k-level Ak
• Lower envelope is 1-level
Breakpoint
Wave
Tuesday, July 16, 2013
14. The Idea
• While the horizontal line moves down, the
breakpoints of Ak and Ak+1 levels move along the
edges of the order-kVoronoi diagram.
Tuesday, July 16, 2013
15. The Events
• Simulate the discrete event points that change the
topological structure of k-level while line l moves
down.
• We store the adjacency relations!
Site Events Circle Events
Tuesday, July 16, 2013
16. Site Events
• Occur when the line hits a new line segment.
• We insert the corresponding wave-curve and
update all levels.
Tuesday, July 16, 2013
24. Circle Events
• Precompute the circle events of all triples of the
consecutive waves.
• A new triple appears - create the circle event
• An old triple disappears - remove the circle event
Tuesday, July 16, 2013
25. Maintaining the ≤k-level
• The breakpoints of k-level and (k+1)-level move
along the edges of the order-kVoronoi diagram
• We need to keep track of k-level!
• A new wave may be introduced to k-level:
• By Site Events
• From (k-1)-level and (k-2)-level by Circle Events
• We need to maintain ≤k-level!
Tuesday, July 16, 2013
26. Data Structures
• Event queue:
• Queue:
Site Events, sorted by y-coordinate.
• Balanced Binary Tree:
Circle Events, sorted by y-coordinate of the
bottom-most point of the circle.
• Levels 1,...,k:
• Balanced Binary Tree for each level:
Sequence of waves that constitute the level.
Tuesday, July 16, 2013
28. Maximum Size of the ≤k-level?
• The complexity of the ≤k-level in arrangement
of Jordan curves [SharirAgarwal’95, Clarkson’87]
• Complexity of the lower envelope [Fortune’87]
• Therefore the complexity of the ≤k-level is:
g≤k(n) = O
k2
g1(n/k)
g1(n) = O(n)
g≤k(n) = O(kn)
Tuesday, July 16, 2013
29. Maximum Size of the Event Queue?
• Event Queue:
• Site Events
• Circle Events
Each Circle Event corresponds to a triple of
consecutive waves in ≤k-level
O(n)
O(kn)
Tuesday, July 16, 2013
30. Time Complexity?
• Site Event
• For each i-level, i = 1,...,k
• Find insertion point
• Update adjacency relations at the point
• For all Site Events:
O(log |Ai|) ≤ O(log (i(n − i))) ≤ O(log n)
O(nk)O(log n) = O(nk log n)
Tuesday, July 16, 2013
31. Number of Circle Events
• Every processed Circle Event corresponds to
some order-iVoronoi vertex, i = 1,...,k
• Therefore total number of processed Circle
Events is the total complexity of order-i
Voronoi diagrams, i = 1,...,k
k
i=1
i(n − i) = O
k2
n
Tuesday, July 16, 2013
32. Time Complexity
• Circle Event
• Remove Circle Event from the queue
• Update adjacency relations relations
on 3 levels:
• For all Circle Events:
O
log O
k2
n
= O(log n)
3O(log n) = O(log n)
O(k2
n)O(log n) = O(k2
n log n)
Tuesday, July 16, 2013
35. Planar Straight-Line Graph
• Weak general position assumption:
“No more than 3 elementary sites touch the
same circle”
Tuesday, July 16, 2013
36. Planar Straight-Line Graph
Bisectors containing 2-dimensional portion
d the maxi-
A1, . . . , Ak.
wing bound
(2)
of levels
exity of the
envelope of
Voronoi di-
e maximum
s1 s2
b(s1, s2)
b(s1, s2)
Fig. 3: Bisector containing 2-dimensional portion
Tuesday, July 16, 2013
37. Planar Straight-Line Graph
Bisectors intersecting non-transversely
A1, . . . , Ak.
owing bound
(2)
of levels
exity of the
envelope of
Voronoi di-
e maximum
nk).
rcle-event in
ent waves at
er of circle-
A1, . . . , Ak,
ed to run in
ertion of the
mber of site-
n). When a
insert it in
on every list
s1 s2
b(s1, s2)
Fig. 3: Bisector containing 2-dimensional portion
s1
s2
s3
s4
b(s1, s4)
b(s2, s4)
b(s3, s4)b(s1, s4)
b(s2, s4), b(s3, s4)
Fig. 4: Bisectors intersecting non-transversely
Tuesday, July 16, 2013
38. Planar Straight-Line Graph
We want to keep the information on the shared
endpoints without altering the structure of the order-k
Voronoi diagram of disjoint line segments.
Tuesday, July 16, 2013
39. Planar Straight-Line Graph
• - a minimal disk centered at point x that
intersects at least k line segments, where p is
an elementary site that touches the disk.
Dp
k(x)
x
Tuesday, July 16, 2013
40. Planar Straight-Line Graph
• - a minimal disk centered at point x that
intersects at least k line segments, where p is
an elementary site that touches the disk.
Dp
k(x)
x
p
Dp
3(x)
Sk(x)
Tuesday, July 16, 2013
41. Generalized Definition
Definition: A set is called an order-k subset if
type-1:
type-2: and there exists a proper order-k
disk , where p is an endpoint common
at least two segments, that intersects exactly
all line segments in .
p - the representative of
H, H ⊆ S
|H| = k
|H| k
Dp
k(x)
Hp
H
Tuesday, July 16, 2013
42. Generalized Definition
The order-k Voronoi region defined:
type-1 - in the ordinary way.
type-2 :
Vk(Hp, S) = {x | ∃Dp
k(x) ∩ Sk(x) = Hp}
Tuesday, July 16, 2013
44. Generalized Definition
Order-2
1
2
3
456
7
8
V (1, 2)
V (6, 5) V (3, 4)
V (3, 8)
V (2, 8)
V (4, 5)
V (7, 5)
V (7, 8)
V (c, 3)
V (c, 8)
V (e, 5)
V (2, 7)
V (d)
V (g)
V (1, 7)
V (6, 7)
a b
c
d
e
f g
Tuesday, July 16, 2013
45. Generalized Definition
Order-3
1
2
3
456
7
8
V (2, 3, 8)
V (3, 4, 8)
V (3, 4, 5)
V (4, 5, 6)V (d, 5)
V (5, 6, 7)
V (1, 6, 7)
V (d, 2)
V (g, 1)
V (1, 2, 8)
V (1, 2, 7)
V (2, 7, 8)
V (1, 7, 8)
V (3, 7, 8)
V (4, 5, 8)
V (4, 5, 7)
V (5, 7, 8)
V (6, 7, 8)
V (c, 7, 8)
V (c, 3, 8)
a b
c
d
e
f g
V (e, 4, 5)
Tuesday, July 16, 2013
46. How we define the k-level?
x
a, b
c
d
e
π(x) = π−
(x), π0
(x), π+
(x)
π(x) = {a}, {b, c, d}, {e}
Tuesday, July 16, 2013
47. How we define the k-level?
x
a, b
c
d
e
π(x) = π−
(x), π0
(x), π+
(x)
Definition: k-level is a set of points x such that
and|π−
(x)| k |π−
(x) ∪ π0
(x)| ≥ k
A3
Tuesday, July 16, 2013
49. SUMMARY
We have developed an algorithm that constructs
the order-kVoronoi diagram of line segments in
time and space.
• Simple
• Easy to implement
• Sweepline
• Can output all order-iVoronoi diagrams for i = 1,...,k
• Generalized to the case of line segments forming
a planar straight-line graph.
O(k2
n log n) O(kn)
Tuesday, July 16, 2013