SLIDE 1 INF562 – G´ eom´ etrie Algorithmique et Applications
Amphi 2 : triangulations de Delaunay (I)
Steve Oudot
SLIDE 2 INF562 – G´ eom´ etrie Algorithmique et Applications
Amphi 2 : triangulations de Delaunay (I)
Steve Oudot
(certains slides sont repris du cours de O. Devillers)
SLIDE 3 Delaunay Triangulations
- 1. Definitions and Examples
- 2. Basic Properties and applications
- 3. Construction
SLIDE 4
Definitions
SLIDE 5
looking for nearest neighbor
SLIDE 6
looking for nearest neighbor
SLIDE 7 Voronoi
Georgy F. Voronoi (1868–1908)
Vi = {q : |qpi| ≤ |qpj| ∀j}
SLIDE 8 Voronoi Delaunay
Boris N. Delaunay (1890–1980)
SLIDE 9 Voronoi Delaunay Voronoi ↔ geometry Delaunay ↔ connectivity (nerve)
Boris N. Delaunay (1890–1980)
SLIDE 10
faces of the Voronoi diagram Voronoi
SLIDE 11
faces of the Voronoi diagram Voronoi
SLIDE 12
faces of the Voronoi diagram Voronoi
SLIDE 13
faces of the Voronoi diagram Voronoi
SLIDE 14
Voronoi is everywhere
SLIDE 15
Voronoi Empty sphere property
SLIDE 16
Voronoi Empty sphere property
SLIDE 17 Voronoi
Delaunay
Empty sphere property
SLIDE 18 Voronoi
Delaunay
Empty sphere property
SLIDE 19 p⋆ = (xp, yp, x2
p + y2 p)
P : z = x2 + y2
point / sphere duality
R2
p = (xp, yp)
SLIDE 20
C : x2 + y2 − 2ax − 2by + c = 0 C∗ : z − 2ax − 2by + c = 0 point / sphere duality
R2
SLIDE 21
p ∈ C p⋆ ∈ C∗ point / sphere duality
R2
SLIDE 22
p ∈ int(C) p⋆ below C∗ point / sphere duality
R2
SLIDE 23
p / ∈ int(C) p⋆ above C∗ point / sphere duality
R2
SLIDE 24
in-sphere predicate
point / sphere duality
R2
SLIDE 25
point / sphere duality
R2 Lower CH Delaunay ⇒ Delaunay is a triangulation
SLIDE 26
Basic properties and applications
SLIDE 27
nearest neighbor graph p q q nearest neighbor of p ⇒ pq Delaunay edge
SLIDE 28
nearest neighbor graph
SLIDE 29 k nearest neighbors
query point k − 1 nearest neighbors kth nearest neighbor
SLIDE 30 k nearest neighbors
query point k − 1 nearest neighbors kth nearest neighbor
SLIDE 31 Largest empty circle
(centered in the convex hull)
SLIDE 32 Largest empty circle
(centered in the convex hull)
SLIDE 33
Minimum Spanning Tree
SLIDE 34
p q
Minimum Spanning Tree
SLIDE 35
p q x y ∀[pq] ∈ A, p − q = min{x − y | x ∈ Ap, y ∈ Aq}
Minimum Spanning Tree
SLIDE 36
p q
Minimum Spanning Tree
SLIDE 37 Mesh generation
(bottom image courtesy of J.-P. Pons)
Applications down the road
SLIDE 38 Mesh generation / remeshing
(image courtesy of P. Alliez)
Applications down the road
SLIDE 39 Mesh generation / remeshing Reconstruction
(cf. s´ eance 6)
Applications down the road
SLIDE 40
Mesh generation / remeshing Reconstruction Path planning Applications down the road
SLIDE 41
Mesh generation / remeshing Reconstruction Path planning and many more... Applications down the road
SLIDE 42
Properties specific to 2D Delaunay
SLIDE 43
Euler formula f: number of facets (except ∞) e: number of edges v: number of vertices f − e + v = 1
SLIDE 44
Euler formula f: number of facets (except ∞) e: number of edges v: number of vertices 1 − 3 + 3 = 1 f − e + v = 1
SLIDE 45
Euler formula f: number of facets (except ∞) e: number of edges v: number of vertices f − e + v = 1 +1 − 2 + 1 = +0
SLIDE 46
number of oriented edges in a triangulation: 2e = 3f + k k: size of ∞ facet
SLIDE 47
Euler formula f − e + v = 1 Triangulation 2e = 3f + k
f = 2v − 2 − k = O(v) e = 3v − 3 − k = O(v)
SLIDE 48
Euler formula f − e + v = 1 Triangulation 2e = 3f + k
f = 2v − 2 − k = O(v) e = 3v − 3 − k = O(v) 2D Delaunay has linear size!
SLIDE 49
Delaunay maximizes the smallest angle
SLIDE 50
Delaunay maximizes the smallest angle
SLIDE 51
Delaunay maximizes the smallest angle
SLIDE 52
... but the converse is false
Delaunay maximizes the smallest angle
SLIDE 53
SLIDE 54
Delaunay maximizes the sequence of angles in lexicographical order
SLIDE 55
Local optimality vs global optimality
highlighted triangle is only locally Delaunay
SLIDE 56
Theorem Locally Delaunay everywhere Globally Delaunay
⇐ ⇒
SLIDE 57 Theorem Locally Delaunay everywhere Globally Delaunay
⇐ ⇒
Will be useful for computing Delaunay in 2D
(Guibas/Stolfi variant of incremental algorithm)
SLIDE 58
Proof:
Let t0 be locally Delaunay, but not globally Delaunay v Let v ∈ disk(t) (v / ∈ t)
t0
SLIDE 59
Proof:
Let t0 be locally Delaunay, but not globally Delaunay v Let v ∈ disk(t) (v / ∈ t)
t0
SLIDE 60
Proof:
Let t0 be locally Delaunay, but not globally Delaunay v Let v ∈ disk(t) (v / ∈ t)
t0 t1
SLIDE 61
Proof:
Let t0 be locally Delaunay, but not globally Delaunay v Let v ∈ disk(t) (v / ∈ t)
t0 t1
SLIDE 62
Proof:
Let t0 be locally Delaunay, but not globally Delaunay v Let v ∈ disk(t) (v / ∈ t)
t0 t1
SLIDE 63
Proof:
Let t0 be locally Delaunay, but not globally Delaunay
Since ∃ finitely many triangles, at some point v is a vertex of ti
v Let v ∈ disk(t) (v / ∈ t)
t0 t1 t2
SLIDE 64
Local optimality and smallest angle Case of 4 points Lemma: For any 4 points in convex position, Delaunay ⇐ ⇒ smallest angle maximized
SLIDE 65
Local optimality and smallest angle Case of 4 points
δ
Let δ be the smallest angle
SLIDE 66
Local optimality and smallest angle Case of 4 points
p q r s δ
Let δ be the smallest angle
≤ δ iff r / ∈ disk(pqs)
SLIDE 67 Algorithm for making a triangulation Delaunay
while ∃ pairs of adjacent triangles that are not locally Delaunay pick an arbitrary pair and flip common edge
SLIDE 68 Algorithm for making a triangulation Delaunay
while ∃ pairs of adjacent triangles that are not locally Delaunay pick an arbitrary pair and flip common edge Theorem: whatever the choice of pairs, the algorithm terminates → proof: each flip increases smallest angle in quad ⇒ cannot be undone
SLIDE 69 Algorithm for making a triangulation Delaunay
while ∃ pairs of adjacent triangles that are not locally Delaunay pick an arbitrary pair and flip common edge Theorem: whatever the choice of pairs, the algorithm terminates → output is (globally) Delaunay → proof: each flip increases smallest angle in quad ⇒ cannot be undone
SLIDE 70 Algorithm for making a triangulation Delaunay
while ∃ pairs of adjacent triangles that are not locally Delaunay pick an arbitrary pair and flip common edge Theorem: whatever the choice of pairs, the algorithm terminates → output is (globally) Delaunay → proof: each flip increases smallest angle in quad ⇒ cannot be undone does not work in higher dimensions (several types of flips possible)
SLIDE 71
Theorem Delaunay ⇒ maximum smallest angle Local optimality and smallest angle
SLIDE 72
Theorem Delaunay ⇒ maximum smallest angle Let T triangulation Proof: Local optimality and smallest angle
SLIDE 73
Theorem Delaunay ⇒ maximum smallest angle Let T triangulation Apply flipping algorithm on T → output is Delaunay Proof: Local optimality and smallest angle
SLIDE 74
Theorem Delaunay ⇒ maximum smallest angle Let T triangulation Apply flipping algorithm on T → output is Delaunay Each flip increases angles within quadrangle Proof: Local optimality and smallest angle → output has larger smallest angle
SLIDE 75
Computing Delaunay in the Plane Lower bound
SLIDE 76
Lower bound for Delaunay Delaunay can be used to sort numbers
SLIDE 77
Lower bound for Delaunay Delaunay can be used to sort numbers
Take an instance of sort Assume one can compute Delaunay in R2 Use Delaunay to solve this instance of sort
SLIDE 78
Let x1, x2, . . . , xn ∈ R, to be sorted
x1 Lower bound for Delaunay
SLIDE 79 Let x1, x2, . . . , xn ∈ R, to be sorted
x1 (x1, x2
1) (x1, x2
1), . . . , (xn, x2 n)
n points
Lower bound for Delaunay
SLIDE 80 Let x1, x2, . . . , xn ∈ R, to be sorted
x1
(x1, x2
1), . . . , (xn, x2 n)
n points
Delaunay → order in x Lower bound for Delaunay
SLIDE 81 Let x1, x2, . . . , xn ∈ R, to be sorted
x1
(x1, x2
1), . . . , (xn, x2 n)
n points
Delaunay → order in x
O(n) O(n) f(n) O(n) + f(n) ∈ Ω(n log n)
Lower bound for Delaunay
SLIDE 82
⇒ f(n) ∈ Ω(n log n) Lower bound for Delaunay
SLIDE 83
Computing Delaunay Incremental algorithm
SLIDE 84
Algorithm overview
SLIDE 85 Algorithm overview
p
SLIDE 86
- Find triangles in conflict with p
Algorithm overview
p
SLIDE 87
- Find triangles in conflict with p
Algorithm overview
p
SLIDE 88
- Find triangles in conflict with p
Algorithm overview
- Delete triangles in conflict
p
SLIDE 89
- Find triangles in conflict with p
Algorithm overview
- Delete triangles in conflict
- Re-triangulate hole w.r.t. p
p
SLIDE 90 Why (and how) it works
Property 1: the conflict zone is connected → compute conflict zone by dfs in dual graph
SLIDE 91 Why (and how) it works
Property 1: the conflict zone is connected → compute conflict zone by dfs in dual graph Property 2: conflict zone is starred with respect to p → re-triangulating the conflict zone w.r.t. p gives a triangulation
SLIDE 92 Why (and how) it works
Property 1: the conflict zone is connected → compute conflict zone by dfs in dual graph Property 2: conflict zone is starred with respect to p Property 3: every new Delaunay triangle is incident to p → re-triangulating the conflict zone w.r.t. p gives a Delaunay tr. → re-triangulating the conflict zone w.r.t. p gives a triangulation
SLIDE 93 The Guibas/Stolfi variant
- Locate point in triangulation
SLIDE 94 The Guibas/Stolfi variant
- Locate point in triangulation
- Star triangle
SLIDE 95 The Guibas/Stolfi variant
- Locate point in triangulation
- Star triangle
- Apply flipping algo.
SLIDE 96 The Guibas/Stolfi variant
- Locate point in triangulation
- Star triangle
- Apply flipping algo.
SLIDE 97 The Guibas/Stolfi variant
- Locate point in triangulation
- Star triangle
- Apply flipping algo.
SLIDE 98 The Guibas/Stolfi variant
- Locate point in triangulation
- Star triangle
- Apply flipping algo.
SLIDE 99 The Guibas/Stolfi variant
- Locate point in triangulation
- Star triangle
- Apply flipping algo.
→ implemented in the Jcg library
SLIDE 100
Delaunay triangulation with constraints
SLIDE 101 Point insertion with constraints
- Locate point in triangulation
SLIDE 102 Point insertion with constraints
- Locate point in triangulation
- Star triangle
SLIDE 103 Point insertion with constraints
- Locate point in triangulation
- Star triangle
- Apply conservative flipping
SLIDE 104 Point insertion with constraints
- Locate point in triangulation
- Star triangle
- Apply conservative flipping
SLIDE 105 Point insertion with constraints
- Locate point in triangulation
- Star triangle
- Apply conservative flipping
SLIDE 106 Point insertion with constraints
- Locate point in triangulation
- Star triangle
- Apply conservative flipping
SLIDE 107
Constraint insertion
SLIDE 108 Constraint insertion
- Insert vertices (if not there)
SLIDE 109 Constraint insertion
- Insert vertices (if not there)
- If edge is there, return
SLIDE 110 Constraint insertion
- Insert vertices (if not there)
- If edge is there, return
- Else, recurse with midpoint
SLIDE 111 Pour le TD d’aujourd’hui
- representation face/sommet de la triangulation
f f.vertex(0) f.vertex(1) f.vertex(2) f f.neighbor(2) f.neighbor(0) f.neighbor(1)
SLIDE 112 Pour le TD d’aujourd’hui
- representation face/sommet de la triangulation
f f.vertex(0) f.vertex(1) f.vertex(2) f HalfedgeHandle(f,0) HalfedgeHandle(f,2) HalfedgeHandle(f,1)
SLIDE 113 Pour le TD d’aujourd’hui
- representation face/sommet de la triangulation
f f.vertex(0) f.vertex(1) f.vertex(2) f.isMarked(2) = true f f.isMarked(1) = false f.isMarked(0) = false
etes de contrainte