introduction to voronoi diagrams and delaunay...
TRANSCRIPT
Introduction to Voronoi Diagramsand Delaunay Triangulations
Solomon Boulos
Introduction to Voronoi Diagrams and Delaunay Triangulations – p.1
Voronoi DiagramsVoronoi region:V (pi) = {x ∈ R
n | ‖pi − x‖ ≤ ‖pj − x‖,∀j ≤ n}
Introduction to Voronoi Diagrams and Delaunay Triangulations – p.2
Delaunay TriangulationDual to Voronoi Diagram
Connect Vertices Across Common Line
Introduction to Voronoi Diagrams and Delaunay Triangulations – p.3
Circumcircle PropertyTi ∈ D(S) ⇐⇒ The circumcircle of Ti is empty
Introduction to Voronoi Diagrams and Delaunay Triangulations – p.4
General PositionWhat if you had points on the same circle?
Introduction to Voronoi Diagrams and Delaunay Triangulations – p.5
PerturbationWhat if we move a point just slightly?
Introduction to Voronoi Diagrams and Delaunay Triangulations – p.6
Circumcircle TestSimple determinant test∣
∣
∣
∣
∣
∣
∣
∣
∣
x2 + y2 x y 1
x21+ y2
1x1 y1 1
x22+ y2
2x2 y2 1
x23+ y2
3x3 y3 1
∣
∣
∣
∣
∣
∣
∣
∣
∣
Equal 0 → On Circle
Less Than 0 → Outside Circle
Greater Than 0 → Inside Circle
Introduction to Voronoi Diagrams and Delaunay Triangulations – p.7
Symbolic PerturbationDeterminant == 0 is very sensitive
Sensitive enough for an ǫ
△(ǫ) =
∣
∣
∣
∣
∣
∣
∣
1 ξ2i−1 + ǫ2i−1 ξ2i + ǫ2i
1 ξ2j−1 + ǫ2j−1 ξ2j + ǫ2j
1 ξ2k−1 + ǫ2k−1 ξ2k + ǫ2k
∣
∣
∣
∣
∣
∣
∣
Further breaks up into sub-determinants
Introduction to Voronoi Diagrams and Delaunay Triangulations – p.8
Naive AlgorithmTake 3 points at random
See if Circumcircle is Empty (test against all points)
If not, add triangle
Introduction to Voronoi Diagrams and Delaunay Triangulations – p.9
Cirumcircle Test is localizedFor nicely distributed points the circumcircles are small
Suggests incremental algorithm
Introduction to Voronoi Diagrams and Delaunay Triangulations – p.10
Incremental AlgorithmAssume we start with a current delaunay triangulation
Choose a new vertex to add at random
Add new triangles, flip edges
Introduction to Voronoi Diagrams and Delaunay Triangulations – p.11
Complete AlgorithmFind the triangle abc containing the new point
Add new edges linking the new point to the vertices ofabc
Perform Swap Test until Stack is Empty
Introduction to Voronoi Diagrams and Delaunay Triangulations – p.15
The Swap TestIf edge is on the convex hull, skip
Otherwise check quad for circumcircle test
If test fails, add new edges
Introduction to Voronoi Diagrams and Delaunay Triangulations – p.16
Why does it work?You start with a Delaunay Triangulation
In each step, only a local neighborhood needs fixup
Each flip may break two more edges (ad and db)
Introduction to Voronoi Diagrams and Delaunay Triangulations – p.17
The Initial TriangulationUgliest Detail
Create a “big triangle”
Needs vertices that won’t be within the circumcircles
Remove vertices from final triangulation
Introduction to Voronoi Diagrams and Delaunay Triangulations – p.18
Total Running TimeTime to find containing triangle (happens n times)
There exist O(logn) methods for this
Time to perform insertion (happens n times)Time to perform a swap (O(1), but how many times?)
Total Time = O(nlogn + nu)
Introduction to Voronoi Diagrams and Delaunay Triangulations – p.19
Look at single flipReplaces link edge with new edge
Adds back two link edges (net increase 1)
Number Link Edges - 3 = Number of Flips
Introduction to Voronoi Diagrams and Delaunay Triangulations – p.20
Upper boundNumber Link Edges = Vertex Degree
3 ≤ Vertex Degree ≤ 6 for planar graphs
Max flips = 3
Total Running Time = O(nlogn)
Introduction to Voronoi Diagrams and Delaunay Triangulations – p.21
LimitationsEdge Flips don’t extend past 2D
Needs initial big triangle
Introduction to Voronoi Diagrams and Delaunay Triangulations – p.22
Determinants and OrientationA determinant is a signed volume∣
∣
∣
∣
∣
∣
∣
x1 y1 1
x2 y2 1
x3 y3 1
∣
∣
∣
∣
∣
∣
∣
= ±‖(~v2 − ~v1) × (~v3 − ~v1)‖
Less than 0 → Clockwise
Greater than 0 → Counter-Clockwise
Introduction to Voronoi Diagrams and Delaunay Triangulations – p.23
Circumcircle as OrientationThe Circumcircle test is an orientation test
Let p′ = (p, ‖p‖2)
Introduction to Voronoi Diagrams and Delaunay Triangulations – p.24
Properties of the Space of SpheresPoints below the cutting plane are inside the circle
Also applies to triangular regions
Introduction to Voronoi Diagrams and Delaunay Triangulations – p.25
Using Convex HullsSimple Algorithm
Introduction to Voronoi Diagrams and Delaunay Triangulations – p.26
Advantages of Convex Hull ApproachMany good Convex Hull Algorithms (e.g. QuickHull)
Simple extension to arbitrary dimensions
No strange infinite triangle initialization
Introduction to Voronoi Diagrams and Delaunay Triangulations – p.27