date post

11-Feb-2016Category

Documentsview

27download

7

Delaunay Triangulation and Tetrahedrilization. Marc van Kreveld Slides DDM. Triangulations and their quality. When going from points on a surface to triangles representing that surface, there are many ways to form the triangles Some ways are better than others. - PowerPoint PPT Presentation

Delaunay Triangulation and TetrahedrilizationMarc van KreveldSlides DDM*

Triangulations and their qualityWhen going from points on a surface to triangles representing that surface, there are many ways to form the trianglesSome ways are better than others*

Triangulations and their qualityThis is not just true visually, but also when the triangulation is the interpolator for a terrain with elevation measurements*

Triangulations and their quality*

Triangulations and their qualityTriangulations are good if theydo not have long edgesdo not have triangles with both short and long edgesdo not have triangles with very small anglesdo not have triangles with obtuse anglesdo not have vertices with high degree*

Voronoi diagramsFor a set of points (sites), the Voronoi diagram is the subdivision of the plane (space) with faces where exactly one of the sites is closest, among all sites*

Voronoi diagramsVoronoi vertices often have degree 3, but it can be much largerVoronoi edges can be bounded or unbounded*Voronoi edgeVoronoi vertex

Voronoi diagramsWith n point sites, there are < 2n Voronoi vertices and < 3n Voronoi edges*Voronoi edgeVoronoi vertex

Voronoi diagramsThe average number of edges bounding a Voronoi cell is six (or slightly less), but a single cell could be bounded by up to n 1 edges*Voronoi edgeVoronoi vertex

Voronoi diagramsVoronoi diagrams have the empty circle property for every Voronoi vertex and Voronoi edge*

Voronoi diagramsEfficient algorithms exist to construct 2D Voronoi diagrams of n point sites, namely O(n log n) time algorithms (as fast as sorting! [mergesort, quicksort])*

Voronoi diagrams3D Voronoi diagrams with n point sites can have up to (n2) Voronoi vertices (0D), Voronoi edges (1D), and Voronoi facets (2D) but of course just n cells (3D)The descriptive complexity can be anything between linear and quadratic in n*

Voronoi diagrams3D Voronoi diagrams with n point sites often have linearly many Voronoi vertices (0D), Voronoi edges (1D), and Voronoi facets (2D)*

Delaunay triangulationFor a set of points in the plane, suppose we compute its Voronoi diagram and use it to make an embedded planar graph G as follows:all points are vertices of the graph Gfor all points whose Voronoi cells share a Voronoi edge, we have an edge in Gfaces of G are implied by the vertices and edges of G*

Delaunay triangulationall points are vertices of the graph Gedges in G correspond to edge-adjacent Voronoi cellsfaces of G are implied by the vertices and edges of G*

Delaunay triangulationall points are vertices of the graph Gedges in G correspond to edge-adjacent Voronoi cellsfaces of G are implied by the vertices and edges of G*

Delaunay triangulationThis graph is called the Delaunay graphNotice that an edge of the Delaunay graph does not necessarily intersect the corresponding Voronoi edge*

Delaunay triangulation*The Delaunay graph is a triangulation of the original points if and only if all Voronoi vertices have degree 3 there is no circle through more than 3 sites and with no sites inside

Delaunay triangulationAny (planar) completion of the Delaunay graph to a triangulation is a Delaunay triangulation of the original points*

Delaunay triangulation*The empty-circle property for Voronoi diagrams transfers to Delaunay triangulationsfor each triangle, its circumcircle contains no other points from the set insidefor each edge, a circle exists through its endpoints that has no other points of the set inside

Delaunay triangulationA Delaunay triangulation of n points has at least n 2 and at most 2n 5 triangles (Delaunay triangles)A Delaunay triangulation of n points has at least 2n 3 and at most 3n 6 edges (Delaunay edges) The empty-circle property is if and only if: if three points have a circumcircle with no points inside or other points on the boundary, then they make a Delaunay triangle (a similar statement holds for edges)

*

Delaunay triangulationWhen a Delaunay graph is not a triangulation, the non-triangular faces have all vertices on a circle*

Delaunay triangulation*

Delaunay triangulation*

Delaunay triangulation*

Delaunay triangulation*

Delaunay triangulation*

Delaunay triangulationWhen we know four Delaunay edges that form an empty convex quadrilateral, we will have one of the two diagonals as a Delaunay edgeThe circumcircles of the triangles of one choice will contain the fourth points, but not for the other choice*

Delaunay triangulationThe Delaunay triangulation maximizes the smallest occurring angle, over all triangulations of the point setIn other words, any other triangulation will have a smaller (or the same) smallest angle*

Delaunay triangulationThe Delaunay triangulation often connects points close together, e.g., every point is connected to its nearest neighborBut it does not minimize total edge length*

Delaunay triangulationIn a triangulation, when two triangles form a convex quadrilateral, their shared edge can be replaced by one other edge This is called an edge flip*flip

Computing the Delaunay triangulationApproach: insert points one-by-one, and restore the Delaunay triangulation after every insertion*Locate the triangle t con-taining the next point pConnect p to ts verticesRestore the Delaunay triangulation by flipping non-Delaunay edgespt

Computing the Delaunay triangulationLocate: Recall that we store triangulations in some convenient structure (triangle-neighbor structure, half-edge structure) From any access point (triangle, half-edge), walk along a straight line to the location of the p, finding the triangle t containing pThe details of the walk depend on the mesh structure used*p

Computing the Delaunay triangulationConnect: Make edges from p to ts vertices; this replaces t by three new trianglesAdapt the mesh representation structure accordingly Claim: These three new edges are Delaunay*p

Computing the Delaunay triangulationProof of claim:Triangle t was Delaunay before the insertion of p, so there was an empty circle C through its vertices*ptv

Computing the Delaunay triangulationProof of claim:Triangle t was Delaunay before the insertion of p, so there was an empty circle C through its verticesConsider the edge between p and any vertex v of t, there is always a circle through p and v completely inside C (grow a small circle from v tangent to C at v, until it hits p)*ptv

Computing the Delaunay triangulationProof of claim:Triangle t was Delaunay before the insertion of p, so there was an empty circle C through its verticesConsider the edge between p and any vertex v of t, there is always a circle through p and v completely inside C (grow a small circle from v tangent to C at v, until it hits p)Since v and p have an empty circle, they define a Delaunay edge*ptv

Computing the Delaunay triangulationRestore: The three new edges are always Delaunay, but the three new triangles need not be *ppDelaunaymaybe not Delaunay

Computing the Delaunay triangulationIn the picture: triangle qrs had an empty circle C(q,r,s) before the insertion of p, but maybe p lies inside now test p C(q,r,s), and if so, edge-flip qr to ps *pDelaunaymaybe not DelaunayqrspqrsC(q,r,s)

Computing the Delaunay triangulationIf flipped, the edges pq, pr, and also ps must be Delaunay, but maybe pqs and prs are not Delaunay triangles recurse on them, using the triangles opposite qs and rs *pDelaunaymaybe not DelaunayqrspqrsDelaunaymaybe not Delaunay

Computing the Delaunay triangulationCode for recursive flipping (restore algorithm):*TestFlipEdge (p, qr) Let s p be the third point of the triangle incident to qrif p is inside C(q,r,s){flip: delete qr and insert ps in the triangulationTestFlipEdge(p, qs)TestFlipEdge(p, sr)}

Computing the Delaunay triangulationComments:The edge flip must be done in our triangle-mesh representation structure (triangle-neighbor, half-edge, )With suitable triangle-mesh structure, a flip takes O(1) time (with an indexed mesh, a flip takes O(n) time)Every edge flip connects p to an extra vertex on the average, about 3 flips are neededThe main geometric test is the so-called in-circle test: does a point p lie inside the circle defined by three points q,r,s?*

The in-circle testThe in-circle test: does a point p lie inside the circle defined by three points q,r,s? (1) The bad way:Compute the bisectors of q,r and r,sIntersect them to get the center c of C(q,r,s)Compute dist(c,p) and dist(c,q) (the radius of C(q,r,s)); if the former is smaller, then p lies inside C(q,r,s)*

The in-circle testThe in-circle test: does a point p lie inside the circle defined by three points q,r,s? (2) The good way:Compute the plane through (qx, qy, qx2 + qy2), (rx, ry, rx2 + ry2), and (sx, sy, sx2 + sy2)Test whether the point (px, py, px2 + py2) lies above or below this plane: below p is inside; above p is outside*

The in-circle testThe in-circle test: does a point p lie inside the circle defined by three points q,r,s? (2) The good way:Compute the plane through (qx, qy, qx2 + qy2), (rx, ry, rx2 + ry2), and (sx, sy, sx2 + sy2)Test whether the point (px, py, px2 + py2) lies above or below this planeThis is equivalent to computing the sign of the 4x4 determinant:*negative inside

The whole algorithmInitialization: we want to make sure that the next point p is always in some triangle of the current triangulation s