cs499 lecture 07 delaunay triangulations and surface ... · delaunay graphs • before we can...
TRANSCRIPT
![Page 1: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/1.jpg)
CS499 Lecture 07 Delaunay Triangulations
and Surface reconstruction
Jyh-Ming Lien
Department of Computer ScienceGeorge Mason University
![Page 2: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/2.jpg)
Triangulation• Triangulation: Given a set of points P, triangulation of
P is a planar subdivision whose bounded faces are triangles with vertices from P
![Page 3: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/3.jpg)
Triangulation is made of triangles
• Internal faces must be triangles, otherwise they could be triangulated further
• Outer polygon must be convex hull
![Page 4: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/4.jpg)
Triangulation: Properties
• triangulation of set of points P: a maximal planar subdivision whose vertices are elements of P
• maximal planar subdivision: a subdivision S such that no edge connecting two vertices can be added to S without destroying its planarity
![Page 5: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/5.jpg)
Triangulation: Properties
• For P consisting of n points, all triangulations contain 2n-2-k triangles, 3n-3-k edges
• n = number of points in P• k = number of points on convex hull of
P
![Page 6: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/6.jpg)
Application: Terrains
• Set of data points P ⊂ R2
• Height ƒ(p) defined at each point p in P
• How can we most naturally approximate height of points not in P?
![Page 7: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/7.jpg)
Option: Discretize
• Let ƒ(p) = height of nearest point for points not in P
• Does not look natural
![Page 8: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/8.jpg)
Better Option: Triangulation
However given a point set, there can be many triangulations
![Page 9: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/9.jpg)
Terrain Problem
• Some triangulations are “better” than others
• Avoid skinny triangles, i.e. maximize minimum angle of triangulation
![Page 10: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/10.jpg)
Delaunay Graphs
• Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay Graphs
• Delaunay Graph of a set of points P is the dual graph of the Voronoi diagram of P
![Page 11: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/11.jpg)
Delaunay Graphs
• To obtain DG(P):• Calculate Vor(P)• Place one vertex in each site of the
Vor(P)
![Page 12: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/12.jpg)
Constructing Delaunay Graphs
• If two sites si and sj share an edge (siand sj are adjacent), create an arc between vi and vj, the vertices located in sites si and sj
![Page 13: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/13.jpg)
Constructing Delaunay Graphs
• Finally, straighten the arcs into line segments. The resultant graph is DG(P).
![Page 14: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/14.jpg)
Properties of Delaunay Graphs
• No two edges cross; DG(P) is a planar graph.
• Largest empty circle property
![Page 15: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/15.jpg)
Delaunay Triangulations
• Delaunay graph is a triangulation if all points are in general position– No four or more points on a circle
![Page 16: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/16.jpg)
Delaunay Triangulations
• These points form empty convex polygons, which can be triangulated.
![Page 17: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/17.jpg)
Properties of Delaunay Triangles• From the properties of Voronoi
Diagrams…• Three points 𝑝𝑝𝑖𝑖,𝑝𝑝𝑗𝑗,𝑝𝑝𝑘𝑘 ∈ 𝑃𝑃 are vertices of the same
face of the DG(P) iff the circle through 𝑝𝑝𝑖𝑖,𝑝𝑝𝑗𝑗,𝑝𝑝𝑘𝑘 contains no point of P on its interior.
![Page 18: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/18.jpg)
Properties of Delaunay Triangles• From the properties of Voronoi Diagrams…
– Two points 𝑝𝑝𝑖𝑖,𝑝𝑝𝑗𝑗 ∈ 𝑃𝑃 form an edge of DG(P) iff there is a closed disc C that contains 𝑝𝑝𝑖𝑖 and 𝑝𝑝𝑗𝑗 on its boundary and does not contain any other point of P.
![Page 19: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/19.jpg)
Properties of Delaunay Triangles
• From the previous two properties…
• A triangulation T of P is a DT(P) iff the circumcircle of any triangle of T does not contain a point of P in its interior
![Page 20: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/20.jpg)
DT and Angle Optimal• The angle optimal triangulation is a DT• If P is in general position, DT(P) is unique
and thus, is angle optimal
• What if multiple DT exist for P?• the minimum angle of each of the DT is the
same• Thus, all the DT are equally “good” for the
terrain problem. All DT maximize the minimum angle
![Page 21: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/21.jpg)
Best Triangulations
• Best triangulation is triangulation that is angle optimal, i.e. has the largest angle vector. Maximizes minimum angle.
• Create angle vector of the sorted angles of triangulation T, A( T ) = (𝛼𝛼1, 𝛼𝛼2, 𝛼𝛼3, … 𝛼𝛼3𝑚𝑚) with 𝛼𝛼1 being the smallest angle
• A( T ) is larger than A( T’ ) iff there exists an isuch that 𝛼𝛼𝑗𝑗 = 𝛼𝛼𝑗𝑗′ for all 𝑗𝑗 < 𝑖𝑖 and 𝛼𝛼𝑖𝑖 = 𝛼𝛼𝑖𝑖′
![Page 22: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/22.jpg)
Transform Triangulations
• Given two triangulations, one can always transform to the other one by flipping edges
![Page 23: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/23.jpg)
Angle Optimal Triangulations
• Consider two adjacent triangles of T:– If the two triangles form a convex quadrilateral, we
could have an alternative triangulation by performing an edge flip on their shared edge.
![Page 24: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/24.jpg)
• Edge e is illegal if:
• Only difference between T containing e and T’ with e flipped are the six angles of the quadrilateral
Illegal Edges
![Page 25: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/25.jpg)
Illegal Triangulations
• If triangulation T contains an illegal edge e, we can make A(T) larger by flipping e
• In this case, T is an illegal triangulation
![Page 26: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/26.jpg)
Testing for Illegal Edges
• If 𝑝𝑝𝑖𝑖, 𝑝𝑝𝑗𝑗, 𝑝𝑝𝑘𝑘, 𝑝𝑝𝑙𝑙 form a convex quadrilateral- when they are all co-circular, 𝑝𝑝𝑖𝑖𝑝𝑝𝑗𝑗 and 𝑝𝑝𝑘𝑘𝑝𝑝𝑙𝑙
are both legal edge• Otherwise, 𝑝𝑝𝑖𝑖𝑝𝑝𝑗𝑗 or 𝑝𝑝𝑘𝑘𝑝𝑝𝑙𝑙 is illegal
![Page 27: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/27.jpg)
Testing for Illegal Edges
• The edge 𝑝𝑝𝑖𝑖𝑝𝑝𝑗𝑗 is illegal iff 𝑝𝑝𝑙𝑙 lies inside C
Circumcircle
28
![Page 28: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/28.jpg)
Legal Triangulations, revisited• A triangulation T of P is legal iff T is a
DT(P).• DT → Legal: Empty circle property implies that all
DT are legal
• Legal → DT: All legal triangles have empty circles
![Page 29: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/29.jpg)
Computing Legal Triangulations1. Compute a triangulation of input points P2. Flip illegal edges of this triangulation until all
edges are legal
• Algorithm terminates because there is a finite number of triangulations
• Too slow to be interesting…
![Page 30: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/30.jpg)
More Efficient Way to Compute DT(P)?
• We could compute Vor(P) then dualizeinto DT(P)– Plane sweep algorithm O(n log n) time
• Instead, we will compute DT(P) using a randomized incremental method– O(n log n) expect time– Provide point location data structure
• Good for height query
![Page 31: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/31.jpg)
Algorithm Overview1. Initialize triangulation T with a “big enough”
helper bounding triangle that contains all points P.
2. Randomly choose a point 𝑝𝑝𝑟𝑟 from P3. Find the triangle ∆ that 𝑝𝑝𝑟𝑟 lies in4. Subdivide ∆ into smaller triangles that have
𝑝𝑝𝑟𝑟 as a vertex5. Flip edges until all edges are legal6. Repeat steps 2-5 until all points have been
added to T
• Let’s skip steps 1, 2, and 3 for now…
![Page 32: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/32.jpg)
Triangle Subdivision: Case 1 of 2• Assuming we have already found the triangle that 𝑝𝑝𝑟𝑟
lives in, subdivide ∆ into smaller triangles that have 𝑝𝑝𝑟𝑟 as a vertex.
• Two possible cases:• 1) 𝑝𝑝𝑟𝑟 lies in the interior of ∆
![Page 33: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/33.jpg)
Triangle Subdivision: Case 2 of 2
• 2) 𝑝𝑝𝑟𝑟 falls on an edge between two adjacent triangles
![Page 34: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/34.jpg)
Which edges are illegal?
• Before we subdivided, all of our edges were legal
• After we add our new edges, some of the edges of T may now be illegal, but which ones?
![Page 35: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/35.jpg)
New Edges are Legal
• Are the new edges (edges involving 𝑝𝑝𝑟𝑟) legal?– Consider any new edge 𝑝𝑝𝑟𝑟𝑝𝑝𝑙𝑙– Before adding 𝑝𝑝𝑟𝑟𝑝𝑝𝑙𝑙, 𝑝𝑝𝑙𝑙 was part of some triangle 𝑝𝑝𝑖𝑖𝑝𝑝𝑗𝑗𝑝𝑝𝑙𝑙– Circumcircle C of 𝑝𝑝𝑖𝑖, 𝑝𝑝𝑗𝑗, and 𝑝𝑝𝑙𝑙 did not contain any other points
of P in its interior
![Page 36: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/36.jpg)
New edges incident to pr are Legal• If we shrink C, we can find a circle C’ that passes
through 𝑝𝑝𝑟𝑟𝑝𝑝𝑙𝑙• C’ contains no points in its interior.• Therefore, 𝑝𝑝𝑟𝑟𝑝𝑝𝑙𝑙 is legal.
• Any new edge incident 𝑝𝑝𝑟𝑟 is legal
![Page 37: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/37.jpg)
Outer Edges May Be Illegal
• An edge can become illegal only if one of its incident triangles changed
• Outer edges of the incident triangles {𝑝𝑝𝑗𝑗𝑝𝑝𝑘𝑘,𝑝𝑝𝑖𝑖𝑝𝑝𝑘𝑘, 𝑝𝑝𝑖𝑖𝑝𝑝𝑗𝑗} or {𝑝𝑝𝑖𝑖𝑝𝑝𝑙𝑙, 𝑝𝑝𝑙𝑙𝑝𝑝𝑗𝑗, 𝑝𝑝𝑗𝑗𝑝𝑝𝑘𝑘, 𝑝𝑝𝑘𝑘𝑝𝑝𝑖𝑖} may have become illegal.
![Page 38: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/38.jpg)
Flip Illegal Edges
• Now that we know which edges have become illegal, we flip them
• However, after the edges have been flipped, the edges incident to the new triangles may now be illegal.
• So we need to recursively flip edges…
![Page 39: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/39.jpg)
LegalizeEdge
• 𝑝𝑝𝑟𝑟 = point being inserted• 𝑝𝑝𝑖𝑖𝑝𝑝𝑗𝑗 = edge that may need to be flipped
LEGALIZEEDGE(𝑝𝑝𝑟𝑟, 𝑝𝑝𝑖𝑖𝑝𝑝𝑗𝑗,𝑇𝑇)1. if 𝑝𝑝𝑖𝑖𝑝𝑝𝑗𝑗 is illegal2. then Let 𝑝𝑝𝑖𝑖𝑝𝑝𝑗𝑗𝑝𝑝𝑙𝑙 be the triangle adjacent to 𝑝𝑝𝑟𝑟𝑝𝑝𝑖𝑖𝑝𝑝𝑗𝑗 along 𝑝𝑝𝑖𝑖𝑝𝑝𝑗𝑗3. Replace 𝑝𝑝𝑖𝑖𝑝𝑝𝑗𝑗 with 𝑝𝑝𝑟𝑟𝑝𝑝𝑙𝑙4. LEGALIZEEDGE(𝑝𝑝𝑟𝑟,𝑝𝑝𝑖𝑖𝑝𝑝𝑙𝑙,𝑇𝑇) 5. LEGALIZEEDGE(𝑝𝑝𝑟𝑟,𝑝𝑝𝑙𝑙𝑝𝑝𝑗𝑗,𝑇𝑇)
![Page 40: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/40.jpg)
Bounding Triangle• Remember, we skipped step 1 of our algorithm.1. Begin with a “big enough” helper bounding
triangle that contains all points.• Let {p-3, p-2, p-1} be the vertices of our bounding
triangle.
“Big enough” means that the triangle:• contains all points of P in its interior.• will not destroy edges between points in P.
![Page 41: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/41.jpg)
Triangle Location Step• Remember, we skipped step 3 of our algorithm. • 3. Find the triangle T that pr lies in
• Take an approach similar to Point Location approach
• Maintain a point location structure D, a directed acyclic graph (DAG)
![Page 42: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/42.jpg)
Structure of D
• Leaves of D correspond to the triangles of the current triangulation.
• Maintain cross pointers between leaves of D and the triangulation.
• Begin with a single leaf, the bounding triangle p-1p-2p-3
![Page 43: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/43.jpg)
Subdivision and D
• Whenever we split a triangle ∆1 into smaller triangles ∆𝑎𝑎 and ∆𝑏𝑏 (and possibly ∆𝑐𝑐), add the smaller triangles to D as leaves of ∆1
![Page 44: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/44.jpg)
Subdivision and D
∆𝐴𝐴∆𝐵𝐵
∆𝐶𝐶
∆𝐴𝐴 ∆𝐵𝐵 ∆𝐶𝐶
![Page 45: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/45.jpg)
Edge Flips and D
• Whenever we perform an edge flip, create leaves for the two new triangles.
• Attach the new triangles as leaves of the two triangles replaced during the edge flip.
![Page 46: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/46.jpg)
Edge Flips and D
∆𝐶𝐶
∆𝐶𝐶
∆𝐶𝐶
![Page 47: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/47.jpg)
Searching D
• 𝑝𝑝𝑟𝑟 = point we are searching with
SearchingD1. Let the current node be the root node of D.2. Look at child nodes of current node. Check which
triangle 𝑝𝑝𝑟𝑟 lies in.3. Let current node = child node that contains 𝑝𝑝𝑟𝑟4. Repeat steps 2 and 3 until we reach a leaf node.
![Page 48: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/48.jpg)
Searching D
• Each node has at most 3 children.• Each node in path represents a triangle
in D that contains 𝑝𝑝𝑟𝑟• Therefore, takes O(number of triangles
in D that contain 𝑝𝑝𝑟𝑟)
![Page 49: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/49.jpg)
Properties of D
• Notice that the:• Leaves of D correspond to the triangles
of the current triangulation
• Internal nodes correspond to destroyedtriangles, triangles that were in an earlier stage of the triangulation but are not present in the current triangulation
![Page 50: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/50.jpg)
Algorithm Overview
1. Initialize triangulation T with helper bounding triangle. Initialize D
2. Randomly choose a point 𝑝𝑝𝑟𝑟 from P3. Find the triangle ∆ that 𝑝𝑝𝑟𝑟 lies in using D4. Subdivide ∆ into smaller triangles that have 𝑝𝑝𝑟𝑟 as a
vertex. – Update D accordingly
5. Call LEGALIZEEDGE on all possibly illegal edges, using the modified test for illegal edges. Update Daccordingly
6. Repeat steps 2-5 until all points have been added
![Page 51: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/51.jpg)
Summary
• Delaunay triangulation is optimal angle-maximize triangulation
• Delaunay triangulation can be done in 𝑂𝑂(𝑛𝑛𝑙𝑙𝑛𝑛𝑛𝑛𝑛𝑛) time using 𝑂𝑂(𝑛𝑛) space
• Delaunay triangulation have many applications
![Page 52: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/52.jpg)
Break
• 10 Min Break
![Page 53: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/53.jpg)
Surface Reconstruction from Unorganized Points
![Page 54: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/54.jpg)
What is Surface Reconstruction?• Set of points in 2d or 3-d space• Generate a mesh from the points
http://web.mit.edu/manoli/www/crust/crust.html
![Page 55: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/55.jpg)
Alpha Shape• Let the space be filled with vanilla ice cream• Let the input points be chocolate chips• Get a ice-cream scoop with size alpha and remove all
reachable ice cream• the remaining part is the alpha shape
56
![Page 56: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/56.jpg)
Alpha Shape
• when alpha is infinitely large– alpha shape is the convex hull
• when alpha is 0– alpha shape is the input points
57
![Page 57: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/57.jpg)
58
![Page 58: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/58.jpg)
Alpha Shape
• Alpha shape is a subset of the Delaunay triangulation
• Algorithm– compute the Delaunay triangulation– remove all edges that has length
larger than alpha– report the remaining edges of the
triangles with at least 1 other edge removed
59
![Page 59: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/59.jpg)
Alpha Shape
• You will need to pick the right alpha to generate the expected shape
• Can take 𝑂𝑂(𝑛𝑛2) time• Improvements
– weighted alpha shape– conformal alpha shapes– ...
60
![Page 60: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/60.jpg)
Crust
• Crust is a set of edges (in 2d) or triangles (in 3d) whose circumcircles is empty of– input points– the medial axis
N. Amenta, M. Bern, and M. Kamvysselis
61
![Page 61: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/61.jpg)
Crust
• the medial axis– A set of points with more than one closest
points on the boundary
62
![Page 62: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/62.jpg)
Crust in 2D
• P is the input points• V is the Voronoi vertices• In 2D, all V are on the medial axis
• Algorithm: Voronoi filtering– Compute D, the Delaunay triangulation of P+V– Find the edges in D whose end points are P, and
report them as crust
63
![Page 63: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/63.jpg)
Crust in 2D
• example
64
![Page 64: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/64.jpg)
Crust in 3D
65
![Page 65: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/65.jpg)
Crust in 3D
• Using poles– two furthest opposite Voronoi vertices in
the cellpoles
66
![Page 66: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/66.jpg)
Crust in 3D
• Algorithm
67
![Page 67: CS499 Lecture 07 Delaunay Triangulations and Surface ... · Delaunay Graphs • Before we can understand an interesting solution to the terrain problem, we need to understand Delaunay](https://reader030.vdocuments.net/reader030/viewer/2022040904/5e781e19de54365c4d7713ee/html5/thumbnails/67.jpg)
Reminder
• Mid-term exam next week– Covering all topics that we have discussed – Read the lecture slides carefully– Chapters 1~5 in your textbook
68