Introduction Triangulations Delaunay Triangulations Delaunay Triangulations Computational Geometry Lecture 12: Delaunay Triangulations Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Motivation: Terrains a terrain is the graph of a function f : A ⊂ R2 → R we know only height values for a set of measurement points how can we interpolate the height at other points? using a triangulation Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Motivation: Terrains a terrain is the graph of a function f : A ⊂ R2 → R we know only height values for a set of measurement points how can we interpolate the height at other points? using a triangulation Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Motivation: Terrains a terrain is the graph of a function f : A ⊂ R2 → R ? we know only height values for a set of measurement points how can we interpolate the height at other points? using a triangulation Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Motivation: Terrains a terrain is the graph of a function f : A ⊂ R2 → R ? we know only height values for a set of measurement points how can we interpolate the height at other points? using a triangulation Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Motivation: Terrains 0 10 a terrain is the graph of a function f : A ⊂ R2 → R using a triangulation – but which? Computational Geometry q 980 20 36 990 6 we know only height values for a set of measurement points how can we interpolate the height at other points? 1000 1008 4 890 interpolated height = 985 28 23 1000 20 0 10 q 980 36 990 6 1008 4 890 interpolated height = 23 Lecture 12: Delaunay Triangulations 28 23 Introduction Triangulations Delaunay Triangulations Triangulation Let P = {p1 , . . . , pn } be a point set. A triangulation of P is a maximal planar subdivision with vertex set P. Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Triangulation Let P = {p1 , . . . , pn } be a point set. A triangulation of P is a maximal planar subdivision with vertex set P. Complexity: 2n − 2 − k triangles 3n − 3 − k edges where k is the number of points in P on the convex hull of P. Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Angle Vector of a Triangulation Let T be a triangulation of P with m triangles and 3m vertices. Its angle vector is A(T) = (α1 , . . . , α3m ) where α1 , . . . , α3m are the angles of T sorted by increasing value. Let T 0 be another triangulation of P. We define A(T) > A(T 0 ) if A(T) is lexicographically larger than A(T 0 ). T is angle optimal if A(T) ≥ A(T 0 ) for all triangulations T 0 of P. Computational Geometry α5 α4 α2 α1 α6 α3 A(T) = (α1 , . . . , α6 ) Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Angle Vector of a Triangulation Let T be a triangulation of P with m triangles and 3m vertices. Its angle vector is A(T) = (α1 , . . . , α3m ) where α1 , . . . , α3m are the angles of T sorted by increasing value. Let T 0 be another triangulation of P. We define A(T) > A(T 0 ) if A(T) is lexicographically larger than A(T 0 ). T is angle optimal if A(T) ≥ A(T 0 ) for all triangulations T 0 of P. Computational Geometry α5 α4 α2 α1 α6 α3 A(T) = (α1 , . . . , α6 ) Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Angle Vector of a Triangulation Let T be a triangulation of P with m triangles and 3m vertices. Its angle vector is A(T) = (α1 , . . . , α3m ) where α1 , . . . , α3m are the angles of T sorted by increasing value. Let T 0 be another triangulation of P. We define A(T) > A(T 0 ) if A(T) is lexicographically larger than A(T 0 ). T is angle optimal if A(T) ≥ A(T 0 ) for all triangulations T 0 of P. Computational Geometry α5 α4 α2 α1 α6 α3 A(T) = (α1 , . . . , α6 ) Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Edge Flipping pl α2 pi α1 α4 pl α3 α5 pj edge flip α20 α6 pi pk α10 α40 α30 α60 α50 pk Change in angle vector: α1 , . . . , α6 are replaced by α10 , . . . , α60 . The edge e = pi pj is illegal if min1≤i≤6 αi < min1≤i≤6 αi0 . Flipping an illegal edge increases the angle vector. Computational Geometry Lecture 12: Delaunay Triangulations pj Introduction Triangulations Delaunay Triangulations Edge Flipping pl α2 pi α1 α4 pl α3 α5 pj edge flip α20 α6 pi pk α10 α40 α30 α60 α50 pk Change in angle vector: α1 , . . . , α6 are replaced by α10 , . . . , α60 . The edge e = pi pj is illegal if min1≤i≤6 αi < min1≤i≤6 αi0 . Flipping an illegal edge increases the angle vector. Computational Geometry Lecture 12: Delaunay Triangulations pj Introduction Triangulations Delaunay Triangulations Edge Flipping pl α2 pi α1 α4 pl α3 α5 pj edge flip α20 α6 pi pk α10 α40 α30 α60 α50 pk Change in angle vector: α1 , . . . , α6 are replaced by α10 , . . . , α60 . The edge e = pi pj is illegal if min1≤i≤6 αi < min1≤i≤6 αi0 . Flipping an illegal edge increases the angle vector. Computational Geometry Lecture 12: Delaunay Triangulations pj Introduction Triangulations Delaunay Triangulations Edge Flipping pl α2 pi α1 α4 pl α3 α5 pj edge flip α20 α6 pi pk α10 α40 α30 α60 α50 pk Change in angle vector: α1 , . . . , α6 are replaced by α10 , . . . , α60 . The edge e = pi pj is illegal if min1≤i≤6 αi < min1≤i≤6 αi0 . Flipping an illegal edge increases the angle vector. Computational Geometry Lecture 12: Delaunay Triangulations pj Introduction Triangulations Delaunay Triangulations Characterisation of Illegal Edges How do we determine if an edge is illegal? Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Characterisation of Illegal Edges How do we determine if an edge is illegal? Lemma: The edge pi pj is illegal if and only if pl lies in the interior of the circle C. pl pj pi pk Computational Geometry Lecture 12: Delaunay Triangulations illegal Introduction Triangulations Delaunay Triangulations Thales Theorem s q Theorem: Let C be a circle, ` a line intersecting C in points a and b, and p, q, r, s points lying on the same side of `. Suppose that p, q lie on C, r lies inside C, and s lies outside C. Then p r b ` a C ]arb > ]apb = ]aqb > ]asb, where ]abc denotes the smaller angle defined by three points a, b, c. Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Thales Theorem s q Theorem: Let C be a circle, ` a line intersecting C in points a and b, and p, q, r, s points lying on the same side of `. Suppose that p, q lie on C, r lies inside C, and s lies outside C. Then p r b ` a C ]arb > ]apb = ]aqb > ]asb, pl where ]abc denotes the smaller angle defined by three points a, b, c. pj pi pk Computational Geometry Lecture 12: Delaunay Triangulations illegal Introduction Triangulations Delaunay Triangulations Thales Theorem s q Theorem: Let C be a circle, ` a line intersecting C in points a and b, and p, q, r, s points lying on the same side of `. Suppose that p, q lie on C, r lies inside C, and s lies outside C. Then p r b ` a C ]arb > ]apb = ]aqb > ]asb, pl where ]abc denotes the smaller angle defined by three points a, b, c. α0 < α β0 < β αβ pi α0 β0 pk Computational Geometry Lecture 12: Delaunay Triangulations pj illegal Introduction Triangulations Delaunay Triangulations Legal Triangulations A legal triangulation is a triangulation that does not contain any illegal edge. Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Legal Triangulations A legal triangulation is a triangulation that does not contain any illegal edge. Algorithm LegalTriangulation(T) Input. A triangulation T of a point set P. Output. A legal triangulation of P. 1. while T contains an illegal edge pi pj 2. do (∗ Flip pi pj ∗) 3. Let pi pj pk and pi pj pl be the two triangles adjacent to pi pj . 4. Remove pi pj from T, and add pk pl instead. 5. return T Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Legal Triangulations A legal triangulation is a triangulation that does not contain any illegal edge. Algorithm LegalTriangulation(T) Input. A triangulation T of a point set P. Output. A legal triangulation of P. 1. while T contains an illegal edge pi pj 2. do (∗ Flip pi pj ∗) 3. Let pi pj pk and pi pj pl be the two triangles adjacent to pi pj . 4. Remove pi pj from T, and add pk pl instead. 5. return T Question: Why does this algorithm terminate? Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Properties Randomized Incremental Construction Analysis Voronoi Diagram and Delaunay Graph Let P be a set of n points in the plane. The Voronoi diagram Vor(P) is the subdivision of the plane into Voronoi cells V(p) for all p ∈ P. Let G be the dual graph of Vor(P). The Delaunay graph DG(P) is the straight line embedding of G. Question: How can we compute the Delaunay graph? Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Properties Randomized Incremental Construction Analysis Voronoi Diagram and Delaunay Graph Let P be a set of n points in the plane. The Voronoi diagram Vor(P) is the subdivision of the plane into Voronoi cells V(p) for all p ∈ P. Let G be the dual graph of Vor(P). The Delaunay graph DG(P) is the straight line embedding of G. Question: How can we compute the Delaunay graph? Computational Geometry Lecture 12: Delaunay Triangulations Vor(P) Introduction Triangulations Delaunay Triangulations Properties Randomized Incremental Construction Analysis Voronoi Diagram and Delaunay Graph Let P be a set of n points in the plane. Vor(P) The Voronoi diagram Vor(P) is the subdivision of the plane into Voronoi cells V(p) for all p ∈ P. G Let G be the dual graph of Vor(P). The Delaunay graph DG(P) is the straight line embedding of G. Question: How can we compute the Delaunay graph? Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Properties Randomized Incremental Construction Analysis Voronoi Diagram and Delaunay Graph Let P be a set of n points in the plane. Vor(P) The Voronoi diagram Vor(P) is the subdivision of the plane into Voronoi cells V(p) for all p ∈ P. DG(P) Let G be the dual graph of Vor(P). The Delaunay graph DG(P) is the straight line embedding of G. Question: How can we compute the Delaunay graph? Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Properties Randomized Incremental Construction Analysis Voronoi Diagram and Delaunay Graph Let P be a set of n points in the plane. Vor(P) The Voronoi diagram Vor(P) is the subdivision of the plane into Voronoi cells V(p) for all p ∈ P. DG(P) Let G be the dual graph of Vor(P). The Delaunay graph DG(P) is the straight line embedding of G. Question: How can we compute the Delaunay graph? Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Properties Randomized Incremental Construction Analysis Planarity of the Delaunay Graph Theorem: The Delaunay graph of a planar point set is a plane graph. contained in V(pi ) pi Ci j pj contained in V(p j ) Computational Geometry Lecture 12: Delaunay Triangulations Properties Randomized Incremental Construction Analysis Introduction Triangulations Delaunay Triangulations Delaunay Triangulation If the point set P is in general position then the Delaunay graph is a triangulation. f Computational Geometry v Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Properties Randomized Incremental Construction Analysis Empty Circle Property Theorem: Let P be a set of points in the plane, and let T be a triangulation of P. Then T is a Delaunay triangulation of P if and only if the circumcircle of any triangle of T does not contain a point of P in its interior. Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Properties Randomized Incremental Construction Analysis Delaunay Triangulations and Legal Triangulations Theorem: Let P be a set of points in the plane. A triangulation T of P is legal if and only if T is a Delaunay triangulation. pm C(pi p j pm ) pi pl e pj pk C(pi p j pk ) Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Properties Randomized Incremental Construction Analysis Angle Optimality and Delaunay Triangulations Theorem: Let P be a set of points in the plane. Any angle-optimal triangulation of P is a Delaunay triangulation of P. Furthermore, any Delaunay triangulation of P maximizes the minimum angle over all triangulations of P. Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Properties Randomized Incremental Construction Analysis Randomized Incremental Construction Algorithm DelaunayTriangulation(P) Input. A set P of n + 1 points in the plane. Output. A Delaunay triangulation of P. 1. Initialize T as the triangulation consisting of an outer triangle p0 p−1 p−2 containing points of P, where p0 is the lexicographically highest point of P. 2. Compute a random permutation p1 , p2 , . . . , pn of P \ {p0 }. 3. for r ← 1 to n 4. do 5. Locate(pr , T) 6. Insert(pr , T) 7. Discard p−1 and p−2 with all their incident edges from T. 8. return T Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Properties Randomized Incremental Construction Analysis Randomized Incremental Construction pr lies in the interior of a triangle pr falls on an edge pi pk pl pr pr pi pj Computational Geometry pj Lecture 12: Delaunay Triangulations pk Introduction Triangulations Delaunay Triangulations Properties Randomized Incremental Construction Analysis Randomized Incremental Construction Insert(pr , T) 1. if pr lies in the interior of the triangle pi pj pk 2. then Add edges from pr to the three vertices of pi pj pk , thereby splitting pi pj pk into three triangles. 3. LegalizeEdge(pr , pi pj , T) 4. LegalizeEdge(pr , pj pk , T) 5. LegalizeEdge(pr , pk pi , T) 6. else (∗ pr lies on an edge of pi pj pk , say the edge pi pj ∗) 7. Add edges from pr to pk and to the third vertex pl of the other triangle that is incident to pi pj , thereby splitting the two triangles incident to pi pj into four triangles. 8. LegalizeEdge(pr , pi pl , T) 9. LegalizeEdge(pr , pl pj , T) 10. LegalizeEdge(pr , pj pk , T) 11. LegalizeEdge(pr , pk pi , T) Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Properties Randomized Incremental Construction Analysis Randomized Incremental Construction LegalizeEdge(pr , pi pj , T) 1. (∗ The point being inserted is pr , and pi pj is the edge of T that may need to be flipped. ∗) 2. if pi pj is illegal 3. then Let pi pj pk be the triangle adjacent to pr pi pj along pi pj . 4. (∗ Flip pi pj : ∗) Replace pi pj with pr pk . 5. LegalizeEdge(pr , pi pk , T) 6. LegalizeEdge(pr , pk pj , T) Computational Geometry pj pk pr Lecture 12: Delaunay Triangulations pi Introduction Triangulations Delaunay Triangulations Properties Randomized Incremental Construction Analysis Randomized Incremental Construction =⇒ pr All edges created are incident to pr . Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Properties Randomized Incremental Construction Analysis Randomized Incremental Construction =⇒ pr All edges created are incident to pr . Correctness: Are new edges legal? Computational Geometry Lecture 12: Delaunay Triangulations Properties Randomized Incremental Construction Analysis Introduction Triangulations Delaunay Triangulations Randomized Incremental Construction pl pj pr C C0 pi Correctness: For any new edge there is an empty circle through endpoints. New edges are legal. Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Properties Randomized Incremental Construction Analysis Randomized Incremental Construction Initializing triangulation: treat p−1 and p−2 symbolically. No actual coordinates. Modify tests for point location and illegal edges to work as if far away. Point location: search data structure. Point visits triangles of previous triangulations that contain it. Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Properties Randomized Incremental Construction Analysis Randomized Incremental Construction flip pi p j ∆1 ∆1 ∆2 ∆3 ∆1 pi ∆2 ∆5 ∆3 ∆3 pj ∆1 ∆2 ∆3 ∆4 ∆5 pk flip pi pk split ∆1 pr ∆2 ∆4 ∆1 ∆3 ∆2 ∆3 ∆4 ∆5 ∆4 ∆2 ∆7 pi ∆6 ∆3 ∆6 Computational Geometry Lecture 12: Delaunay Triangulations ∆7 Introduction Triangulations Delaunay Triangulations Properties Randomized Incremental Construction Analysis Analysis 1 Expected total number of triangles created in O(n) 2 Expected total number of triangles visited while search point location data structure: O(n log n) We will only consider the first (see book for second) Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Properties Randomized Incremental Construction Analysis Analysis Lemma: Total number of triangles created is at most 9n + 1. How many triangles are created when inserting pr ? Backwards analysis: Any point of p1 , . . . , pr has the same probability 1/r to be pr . Expected degree of pr ≤ 6. Number of triangles created ≤ 2degree(pr ) − 3 (Why? Count flips.) 2·6−3 = 9 + outer triangle Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Properties Randomized Incremental Construction Analysis Analysis Lemma: Total number of triangles created is at most 9n + 1. How many triangles are created when inserting pr ? Backwards analysis: Any point of p1 , . . . , pr has the same probability 1/r to be pr . Expected degree of pr ≤ 6. Number of triangles created ≤ 2degree(pr ) − 3 (Why? Count flips.) 2·6−3 = 9 + outer triangle Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Properties Randomized Incremental Construction Analysis Analysis Lemma: Total number of triangles created is at most 9n + 1. How many triangles are created when inserting pr ? Backwards analysis: Any point of p1 , . . . , pr has the same probability 1/r to be pr . Expected degree of pr ≤ 6. Number of triangles created ≤ 2degree(pr ) − 3 (Why? Count flips.) 2·6−3 = 9 + outer triangle Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Properties Randomized Incremental Construction Analysis Analysis Lemma: Total number of triangles created is at most 9n + 1. How many triangles are created when inserting pr ? Backwards analysis: Any point of p1 , . . . , pr has the same probability 1/r to be pr . Expected degree of pr ≤ 6. Number of triangles created ≤ 2degree(pr ) − 3 (Why? Count flips.) 2·6−3 = 9 + outer triangle Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Properties Randomized Incremental Construction Analysis Analysis Lemma: Total number of triangles created is at most 9n + 1. How many triangles are created when inserting pr ? Backwards analysis: Any point of p1 , . . . , pr has the same probability 1/r to be pr . Expected degree of pr ≤ 6. Number of triangles created ≤ 2degree(pr ) − 3 (Why? Count flips.) 2·6−3 = 9 + outer triangle Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Properties Randomized Incremental Construction Analysis Analysis Lemma: Total number of triangles created is at most 9n + 1. How many triangles are created when inserting pr ? Backwards analysis: Any point of p1 , . . . , pr has the same probability 1/r to be pr . Expected degree of pr ≤ 6. Number of triangles created ≤ 2degree(pr ) − 3 (Why? Count flips.) 2·6−3 = 9 + outer triangle Computational Geometry Lecture 12: Delaunay Triangulations Introduction Triangulations Delaunay Triangulations Properties Randomized Incremental Construction Analysis Analysis Theorem: The Delaunay triangulation of n points can be computed in O(n log n) expected time. Computational Geometry Lecture 12: Delaunay Triangulations
© Copyright 2025 Paperzz