computational geometry csci3250
play

Computational Geometry csci3250 Laura Toma Bowdoin - PowerPoint PPT Presentation

Computational Geometry csci3250 Laura Toma Bowdoin College Today Triangulations Delaunay triangulation Properties How to construct it Applications Triangulation Input: P = {p 1


  1. Computational Geometry csci3250 � � � � � � Laura Toma � Bowdoin College

  2. Today Triangulations • Delaunay triangulation • Properties • How to construct it • Applications •

  3. Triangulation Input: P = {p 1 , p 2 ,…,p n } set of points in the plane � A triangulation T(P) is a maximal planar subdivision whose vertices are P. � maximal planar subdivision: no edge can be added without distorting planarity planar : edges can only intersect at endpoints � � � � � � � � � � � � � � � � � Every bounded face must be a triangle. The unbounded face : bounded by convex hull.

  4. P = {p 1 , p 2 ,…,p n } set of points in the plane Many triangulations possible • In practice, want triangulations without small angles • small angles cause numerical instability with geometric predicates, etc •

  5. P = {p 1 , p 2 ,…,p n } set of points in the plane Size of a triangulation Let k = number of points in P that lie on CH(P). • Any triangulation of P has 2n - 2 -k triangles and 3n - 3 - k edges. • � Proof: Use Euler’s formula: e - v + f = 2; •

  6. P = {p 1 , p 2 ,…,p n } set of points in the plane Voronoi Diagram Vor(P) Vor(p i ): all points in the plane that are closer to p i than to any other site • p 2 v p 1 p 3

  7. P = {p 1 , p 2 ,…,p n } set of points in the plane Voronoi Diagram Vor(P) The edges of Vor(P) are (segments of) perpendicular bisectors • p 2 v p 1 p 3

  8. P = {p 1 , p 2 ,…,p n } set of points in the plane no 4 points co-circular Voronoi Diagram Vor(P) Every Voronoi vertex is the intersection of 3 Voronoi regions • (if no 4-points co-circular) p 2 v p 1 p 3

  9. P = {p 1 , p 2 ,…,p n } set of points in the plane Voronoi Diagram Vor(P) Degeneracies • more than 3 points lie on same circle • collinear points •

  10. P = {p 1 , p 2 ,…,p n } set of points in the plane no 4 points co-circular Voronoi Diagram Vor(P) Every Voronoi vertex is the intersection of 3 Voronoi regions • v is equidistant from p 1 , p 2 , p 3 • p 2 v p 1 p 3

  11. P = {p 1 , p 2 ,…,p n } set of points in the plane no 4 points co-circular Voronoi Diagram Vor(P) Every Voronoi vertex is the intersection of 3 Voronoi regions • v is equidistant from p 1 , p 2 , p 3 • • C(v): circle of p 1 ,p 2 ,p 3 has center v p 2 v p 1 p 3

  12. P = {p 1 , p 2 ,…,p n } set of points in the plane no 4 points co-circular Voronoi Diagram Vor(P) Every Voronoi vertex is the intersection of 3 Voronoi regions • v is equidistant from p1, p2, p3 • • C(v): circle of p1,p2,p3 has center at v • No other site can be inside C(v) <———— empty circle property p 2 v p 1 p 3 • Every Voronoi vertex is the center of a circle that has 3 sites on its boundary and no other sites inside

  13. P = {p 1 , p 2 ,…,p n } set of points in the plane no 4 points co-circular The dual of Vor(P) For every pair of Voronoi regions Vor(u) and Vor(v) that share and edge, draw • an edge between u and v ==> Each Voronoi vertex v defines a triangle p 2 v p 1 p 3

  14. P = {p 1 , p 2 ,…,p n } set of points in the plane no 4 points co-circular Delaunay triangulation DT Theorem [Delaunay 1934]: The straight-line dual of Vor(P) is planar, and is a triangulation. Proof: not trivial (see p.197 in 4M book) p 2 v p 1 p 3

  15. P = {p 1 , p 2 ,…,p n } set of points in the plane no 4 points co-circular Delaunay triangulation DT

  16. P = {p 1 , p 2 ,…,p n } set of points in the plane no 4 points co-circular Delaunay triangulation DT By definition, DT(P) is the dual of Vor(P). Would be nice to have a direct way to characterize DT(P) (without Vor(P)).

  17. P = {p 1 , p 2 ,…,p n } set of points in the plane no 4 points co-circular Delaunay triangulation DT What we know from Vor(P) p 1 p 2 p 3 is a triangle in DT(P) <==> circumcircle of p 1 p 2 p 3 is empty • � p 2 � p 2 � � v � p 1 p 3 p 1 p 3 � � � � Theorem: A triangulation T(P) is the DT(P) iff all triangles of T(P) have the empty-circle property. Proof: “==>” easy “<==“ requires a bit more work

  18. Delaunay triangulation DT How to build a triangulation such that all triangles have empty-circle property ? • p 2 circumcircle of p 1 p 2 p 3 is empty p 1 p 3

  19. P = {p 1 , p 2 ,…,p n } set of points in the plane no 4 points co-circular How to build a triangulation? • Input: a set of points • Output: a partition of CH(P) into triangles • � � � � � � � �

  20. P = {p 1 , p 2 ,…,p n } set of points in the plane no 4 points co-circular Many triangulations possible •

  21. P = {p 1 , p 2 ,…,p n } set of points in the plane no 4 points co-circular Class work: Come up with an algorithm to compute a triangulation of P • � � � � � � � � � � � Possible ideas: incremental, plane sweep, divide-and-conquer, … •

  22. Flipping edges edge flips

  23. Flipping edges and empty circles edge flips How to get a DT? Compute an arbitrary triangulation T(P) • edge flips T ————> DT • c c c a b a b a b d d d flip ab to cd C(abc) contains d b outside C(acd) WHY?

  24. Lemma: d inside C(abc) <==> b outside C(abd) c a b d c a b • Why? � • basic geometry of angles (Thales theorem) a > b > c

  25. Note condition is symmetrical: d inside C(abc) <==> c inside C(abs) c a b d c a b • Why? � • basic geometry of angles (Thales theorem) a > b > c

  26. Flipping edges and empty circles edge flips Notation: edge ab is illegal iff d is inside C(abc) • (a legal edge also called a locally Delaunay edge) edge ab is legal iff not illegal (d on or outside C(abc)) • c c c a b a b a b d d d flip ab illegal cd legal

  27. Flipping edges and empty circles Theorem, revisited: A triangulation where all edges are locally Delaunay (legal) is the DT. (locally Delaunay ==> globally Delaunay) c c a b a b d d flip ab to cd ab illegal cd legal

  28. Delaunay triangulation DT via edge flipping � c • construct an arbitrary triangulation T • mark all edges in T and put them in S • while S not empty a b • pop edge ab from S and un-mark it d • if ab not legal: • flip edge and update T • for each new edge ac, ad, bc, bc: if not marked, push it on S and mark it Does this ever terminate?.. If it terminates, T is DT (by theorem)

  29. Edge flipping and angles c c a2 b2 b3 a1 a3 b4 b1 a b a4 a5 b a a6 b5 b6 d d angle vector before A(T) = [a1, a2, a3, a4, a5, a6] after A(T’) = [b1, b2, b3, b4, b5, b6] � Claim: For each new angle, there is an old angle that’s <= to it. Proof: b1 = a1+a4 > a1 b2 > a5 (b outside C(acd)) b3 > … similar b4 = a3 + a5 > a3 b5 > … similar b6 > a3 (b outside C(acd))

  30. Edge flipping and angles c c a2 b2 b3 a1 a3 b4 b1 a b a4 a5 b a a6 b5 b6 d d Flipping an illegal edge to a legal edge increases minimum angle. Proof: Follows because each angle in T’ is larger than an angle in T. � DT maximizes minimum angle. Proof: DT has only legal edges. Any other flip would cause the min angel to decrease.

  31. c c More generally.. a2 b2 b3 a1 a3 b4 b1 a4 a5 b a b a a6 b5 b6 d d A triangulation T. consider all angles in each of its m triangles => 3m angles sort angles increasingly: a 1 ≦ a 2 ≦ a 3 ≦ …… ≦ a 3m A(T) = [a 1, a 2, a 3, ……,a 3m ] � We say A(T) > A(T’) if A(T) > A(T’) lexicographically. [2,5,6] > [1,2,3] [1,2,3] > [1,1,9] � Of all possible triangulations, DT maximizes the angle vector. That is, for all T’, A(DT) > A(T’). Proof: An edge flip increases the angle vector.

  32. DT Applications DT used because it is angle-optimal. • Small angles • Numerical instability, Interpolation errors • Issues with geometric predicates (leftOf, tangents, derivatives) •

  33. P = {p 1 , p 2 ,…,p n } set of points in the plane no 4 points co-circular Computing DT: RIC b RIC (Randomized Incremental Construction) � Start with a large triangle T that contains P. • Compute a random permutation of the points in P • p For each point p in P do: • a //insert p in T find triangle abc of T that contains p • c splitting into 3 triangles: abp, bcp, cap and update T • LegalizeEdge(p, ab, T) • LegalizeEdge(p, bc, T) • LegalizeEdge(p, ca, T) • discard the initial triangle T and its edges • return T •

  34. P = {p 1 , p 2 ,…,p n } set of points in the plane no 4 points co-circular Computing DT: RIC LegalizeEdge(p, uv, T) � //the point being inserted is p, and edge uv may need to be flipped if uv is illegal • let uvq be the triangle adjacent to uv, on the other side of p • flip uv and update T • LegalizeEdge(p, uq, T) • b LegalizeEdge(p, qv, T) • p a c

  35. b p a c

  36. b p a c

  37. b p a c q

  38. b p a c q

  39. b p a c q

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend