Degree-driven algorithm design for computing the Voronoi diagram
description
Transcript of Degree-driven algorithm design for computing the Voronoi diagram
Degree-driven algorithm design for computing the Voronoi
diagram
Jack Snoeyink
FWCG08Oct 31, 2008
David L. Millman
University of North Carolina - Chapel Hill
2
Voronoi diagrams
3
Voronoi diagrams
Implicit Voronoi Diagram [LPT97]
4
Implicit Voronoi Diagram [LPT97] Topological component
• Planar embedding Geometric Component
• Each vertex (vx,vy) of Voronoi diagram of S
€
vx* =
vx 0 ≤ vx ≤ 2b −1 and vx is an integer
vx⎣ ⎦ + 12
0 ≤ vx ≤ 2b −1 and vx is not an integer
0 vx < 02b − 1
2 vx > 2b −1
⎧
⎨ ⎪ ⎪
⎩ ⎪ ⎪
Same for vy*
5
Basic ProblemGiven:
sites S ={s1,s2,…,sn} w/ b-bit integer coords
Construct:
implied Voronoi V*(S) with minimum precision.
Note: precision < 5b bits precludes computing the Voronoi Diagram…
6
Previous WorkHandling the precision requirements of
geometric computation: Rely on machine precision Exact Geometric Computation [Y97] Arithmetic Filters [FV93][DP99] Adaptive Predicates [P92][S97] Topological Consistency [SI92] Degree-driven algorithmic design [LPT97]
7
Cell GraphCell Vertex
Cell Edge
Grid Cell Vertex
Non-Grid Cell Vertex
8
Randomized Incramental [SI92]
9
bisectorInCellGiven:
Two sites s1, s2, and a grid cell G
Decide: Whether b12 passes through G
€
g = xg ,yg( )
g− s12 = gx − x1( )
2 + gy − y1( )2
10
Arithmetic Degree Arithmetic degree
- monomial, sum of the arithmetic degree of its variables
- polynomial, largest arithmetic degree of its monomials
€
gx − x1( )2 + gy − y1( )
2
? gx − x2( )2 + gy − y2( )
2
€
gx − x1
16 7 8 ⎛
⎝ ⎜ ⎜
⎞
⎠ ⎟ ⎟
2
26 7 4 8 4
+ gy − y1
16 7 8 ⎛
⎝ ⎜ ⎜
⎞
⎠ ⎟ ⎟
2
26 7 4 8 4
€
gx − x1
16 7 8 ⎛
⎝ ⎜ ⎜
⎞
⎠ ⎟ ⎟
2
+ gy − y1
16 7 8 ⎛
⎝ ⎜ ⎜
⎞
⎠ ⎟ ⎟
2
€
gx1}
− x1
1} ⎛
⎝ ⎜
⎞
⎠ ⎟2
+ gy1}
− y1
1} ⎛
⎝ ⎜
⎞
⎠ ⎟2
€
gx − x1( )2
26 7 4 8 4 + gy − y1( )
2
26 7 4 8 4
21 2 4 4 4 3 4 4 4
11
bisectorInCellGiven:
Two sites s1, s2, and a grid cell G
Decide: Whether b12 passes through G Degree 2 and constant time
€
g = xg ,yg( )
q− s12 = gx − x1( )
2 + gy − y1( )2
12
stabbingOrderingGiven:
Two bisectors b12 & b34 that stab a grid cell G
Determine: The order in which the bisectors intersect the cell walls
Degree 3 and constant time
€
q = xq ,yq( )
q− s1 = q− s2x1
2 − x22 + y1
2 − y22 = 2 x1 − x2( )xq − 2 y1 − y2( )yq
13
bisectorWalkGiven:
Two sites s1, s2 and a direction to walk
bisectorWalk:a traversal of a subset of the cells that b12 passes though. Degree 2 and log(g)
14
bisectorIntersection
Degree 3 and log(g)
Given: Four sites si, i={1,2,3,4}
Find: The grid cell that contains the intersection of bisectors b12 & b34
15
Results Method for computing the implicit Voronoi
diagram using predicates of max degree 3. Running time is in O(n (log n + log g)),
where g is the max bisector length. First construction of the implicit Voronoi
w/o computing the full Voronoi diagram.
16
Future Work Can we do this in degree 2? Generalizing to other diagrams Diagrams with non-linear bisectors Identify the grid cell containing a bisector
intersection in constant time
17
Happy Halloween
Thank you!