cs6100 topics in design and analysis of algorithms
play

CS6100: Topics in Design and Analysis of Algorithms Delaunay - PDF document

CS6100: Topics in Design and Analysis of Algorithms Delaunay Triangulation John Augustine CS6100 (Even 2012): Delaunay Triangulation Triangulation of a Planar Point Set A triangulation of P is planar subdivision of the plane in which (i) end


  1. CS6100: Topics in Design and Analysis of Algorithms Delaunay Triangulation John Augustine CS6100 (Even 2012): Delaunay Triangulation

  2. Triangulation of a Planar Point Set A triangulation of P is planar subdivision of the plane in which (i) end points of line segments are in P and (ii) no line segment (connecting points in P ) can be added without destroying planarity. → Bounded faces are triangles — hence triangulation. → Convex hull edges always included. Theorem 1. Let P have n points (not all collinear) and k points on the convex hull. • Number of triangular faces m is 2 n − 2 − k . • Number of edges is 3 n − 3 − k . Proof Idea. Total # of faces is m + 1 where 1 is unbounded and others are triangles. The total number of edges is 3 m + k (why?) . Results follow by applying 2 Euler’s formula. CS6100 (Even 2012): Delaunay Triangulation 1

  3. How do we compare the skinniness triangulations? Define angle-vector A ( T ) of a triangulation T as vector of angles sorted in non-decreasing order. We use lexicographic comparison on the angle vectors to compare skinniness of triangulations. More precisely, let A ( T ) = { α 1 , α 2 , . . . } and A ( T ′ ) = { α ′ 1 , α ′ 2 , . . . } . We say that A ( T ) > A ( T ′ ) if for some i , ∀ j < i, α j = α ′ α i > α ′ and i . j We say that a triangulation T is angle-optimal if � ∃ T ′ such that A ( T ′ ) > A ( T ) . CS6100 (Even 2012): Delaunay Triangulation 2

  4. Flipping an Illegal Edge Let e be a non-boundary edge between two triangles that form a convex quadrilateral. This edge can be “flipped” to e ′ . If this flip locally improves the angle vector, then we call e illegal. p l p l p j p j α ′ α 3 α 2 edge flip α ′ 4 α ′ 6 α 5 2 α ′ α 1 5 α 6 α ′ α ′ α 4 1 p i p i 3 p k p k Observation 2. If e is an illegal edge in T and T ′ is obtained by flipping e , then, A ( T ′ ) > A ( T ) . CS6100 (Even 2012): Delaunay Triangulation 3

  5. How to check if an edge is illegal? p l p j p i p k illegal Lemma 3. In the above figure, if p l is inside circle through p i , p k , and p j , then the edge (as indicated) is illegal. (This follows from Thales’ Theorem.) Theorem 4 (Thales’ Theorem) . In Figure 1, ∠ arb > ∠ apb = ∠ aqb > ∠ asb. s q p r b ℓ a C Figure 1: Figure for Thales’ Theorem. CS6100 (Even 2012): Delaunay Triangulation 4

  6. Legal Triangulation A legal triangulation does not contain any illegal edge. Recall Observation 2. ⇒ A repeated flipping of illegal edges will terminate make eventually make the triangulation legal. Observation 5. Every angle-optimal triangulation is a legal triangulation. Is the converse true? See http://www.cs.technion.ac.il/~barequet/ teaching/cg/misc/DT-deg-pos.pdf for more details. CS6100 (Even 2012): Delaunay Triangulation 5

  7. Towards Delaunay Graph Consider a set P of points/sites in the plane. Let Vor ( P ) be its Voronoi diagram. Each site p has a cell V ( p ) associated with it. The dual graph of Vor P in which the vertices are the sites and two sites p i and p j are connected iff their cells V ( p i ) and V ( p j ) share an edge in Vor ( P ) . G Vor ( P ) CS6100 (Even 2012): Delaunay Triangulation 6

  8. Delaunay Graph A straight line embedding of the dual graph on the set P of points is called the Delaunay Graph (denoted DG ( P ) ). Theorem 6. The Delaunay graph is a plane graph. CS6100 (Even 2012): Delaunay Triangulation 7

  9. Proof of Theorem 6 Proof. Recall that the perpendicular bisector between two sites appears in Vor ( P ) iff ∃ a circle touching the sites but not enclosing any other site. In other words, p i p j is in DG ( P ) iff ∃ closed disc C ij with p i and p j on the boundary and no other site is contained in it. Let t ij be the triangle formed by p i , p j , and center of (some) C ij . contained in V ( p i ) p i C ij p j contained in V ( p j ) Note that edge of t ij between p i and center of C ij is inside V ( p i ) . CS6100 (Even 2012): Delaunay Triangulation 8

  10. Suppose there is another edge p k p l also in DG ( P ) such that p i p j and p k p l intersect. (As defined for p i p j , define C kl and t kl for p k p l .) If p k p l intersected p i p j , it must also intersect one other edge e of t ij . Why? (Because p k and p l are outside C ij and therefore outside t ij . Likewise an edge e ′ of t kl must intersect p i p j . Notice that this implies that one of the edges of t ij incident to center of C ij and one of the edges of t kl incident to center of C kl must intersect. But, those edges must be contained within their respective Voronoi cells, which is a contradiction. CS6100 (Even 2012): Delaunay Triangulation 9

  11. Delaunay Triangulation A vertex v ∈ Vor ( P ) corresponds to a face in DG ( P ) . If v has degree k , then, the corresponding face is a k -gon. Furthermore, it is a convex k -gon. Why? v f A Delaunay Triangulation is a triangulation obtained by adding edges to a delaunay graph. CS6100 (Even 2012): Delaunay Triangulation 10

  12. Let P be a set of points in the plane. Theorem 7. 1. Three points form a triangle in DG ( P ) iff the circle through those three points does not enclose any other point in P . 2. Two points form an edge in DG ( P ) iff ∃ a circle through those two points that does not enclose any other point in P . 8. A triangulation T is a Delaunay Theorem triangulation iff the circumcircle of any triangle in T does not contain any point in its interior. Theorem 9. A triangulation T is legal iff T is a Delaunay triangulation. CS6100 (Even 2012): Delaunay Triangulation 11

  13. Proof of Theorem 9 Proof. Easy to see that any Delaunay triangulation is legal. So focus on opposite direction. Assume for contradiction that T is a legal triangulation, but not a Delaunay triangulation. From Theorem 7, ∃ p i , p j , p k such that circumcircle C ( p i , p j , p k ) contains point p l ∈ P in its interior. Let e = p i p j be the edge chosen so that △ p i p j p l does not intersect △ p i p j p k . p m C ( p i p j p m ) p i p l e p j p k C ( p i p j p k ) Notice that △ p i p j p l cannot be a triangle in T as e can be flipped to improve angle-optimality. Therefore, CS6100 (Even 2012): Delaunay Triangulation 12

  14. ∃ p m � = p l such that △ p i p j p m is in T . (Note that e cannot be a boundary edge.) From Lemma 3 (since T is a legal triangulation), p m is outside C ( p i , p j , p j ) . Let p j p m be the edge such that △ p j p m p l does not intersect p j p m p i . But, by Thales’ Theorem, ∠ p j p l p i > ∠ p j p m p i , a contradiction as it allows p j p m to be flipped. Theorem 10. 1. Any angle optimal triangulation is a Delaunay triangulation. 2. Any Delaunay triangulation maximizes the minimum angle. CS6100 (Even 2012): Delaunay Triangulation 13

  15. A Randomized Incremental Construction of Delaunay Triangulation Let P = { p 0 , p 1 , . . . , p n } be a set of points in the plane and let p 0 be the highest point in P , whereas, the rest of the points are randomly permuted. Enclose P in △ p 0 p − 1 p − 2 , where p − 1 and p − 2 are dummy points. △ p 0 p − 1 p − 2 must be large enough so that p − 1 and p − 2 don’t lie in any circle defined by three points in P . p − 2 p 0 p − 1 We start with △ p 0 p − 1 p − 2 as the current triangulation and incrementally add points taken from a random permutation { p 1 , p 2 , . . . , p n } of the remaining points. CS6100 (Even 2012): Delaunay Triangulation 14

  16. Two Cases p r lies in the interior of a triangle p r falls on an edge p i p k p l p k p r p r p i p j p j In either case, illegal edges can be introduced, so we legalize them by testing each potentially illegal edge and flipping illegal edges. ⇒ = p r Note that all edges created are incident to the newly inserted point p r . CS6100 (Even 2012): Delaunay Triangulation 15

  17. Pseudocode Algorithm D ELAUNAY T RIANGULATION ( P ) Input. A set P of n + 1 points in the plane. Output. A Delaunay triangulation of P . 1. Let p 0 be the lexicographically highest point of P , that is, the rightmost among the points with largest y -coordinate. Let p − 1 and p − 2 be two points in R 2 sufficiently far away and such that P is contained in 2. the triangle p 0 p − 1 p − 2 . 3. Initialize T as the triangulation consisting of the single triangle p 0 p − 1 p − 2 . Compute a random permutation p 1 , p 2 ,..., p n of P \{ p 0 } . 4. for r ← 1 to n 5. do ( ∗ Insert p r into T : ∗ ) 6. 7. Find a triangle p i p j p k ∈ T containing p r . 8. if p r lies in the interior of the triangle p i p j p k 9. then Add edges from p r to the three vertices of p i p j p k , thereby splitting p i p j p k into three triangles. L EGALIZE E DGE ( p r , p i p j , T ) 10. L EGALIZE E DGE ( p r , p j p k , T ) 11. L EGALIZE E DGE ( p r , p k p i , T ) 12. else ( ∗ p r lies on an edge of p i p j p k , say the edge p i p j ∗ ) 13. 14. Add edges from p r to p k and to the third vertex p l of the other triangle that is incident to p i p j , thereby splitting the two triangles incident to p i p j into four triangles. L EGALIZE E DGE ( p r , p i p l , T ) 15. L EGALIZE E DGE ( p r , p l p j , T ) 16. L EGALIZE E DGE ( p r , p j p k , T ) 17. L EGALIZE E DGE ( p r , p k p i , T ) 18. 19. Discard p − 1 and p − 2 with all their incident edges from T . 20. return T CS6100 (Even 2012): Delaunay Triangulation 16

Recommend


More recommend