Delaunay Triangulation - UCSB Computer Science

Delaunay Triangulation
Subhash Suri
November 19, 2015
1
Delaunay Triangulation
• The Voronoi diagram of n sites in the plane is a planar graph. (Use a vertex at infinity
as terminus for all half-rays.)
• Consider the dual graph, where vertices are the “sites” (each associated with a unique
face of the VoD) and an edge between two sites pi and pj if their Voronoi cells share a
common boundary (edge).
• Figure, with dual drawn using curved edges.
• It turns out that if we draw this dual graph with straight-line edges, we get a triangulation of the sites. (We assume non-degeneracy.)
• That is, the straight line dual does not create edge intersections and forms a triangulation of the sites.
• Figure, with dual drawn as straight line edges.
• What is a triangulation T of a set of points P ?
• It is a collection of triangles T such that
– Their union is the convex hull of P
– The union of their vertices is the set P
– Two triangles of T are either disjoint or share a vertex or an edge.
• Figure, a triangulation of points.
• Every finite set of points (unless all collinear) has a triangulation.
1
• One obvious one being: Start with the convex hull; Using the lowest point, split the
hull into triangles; Triangulate the points inside each triangle, by adding one at a time.
• Let P be a set of n points, of which k lie on the convex hull of P . Then, every
triangulation of P has (2n − 2 − k) triangles and (3n − 3 − k) edges.
• Proof by induction. The k CH vertices create k − 2 triangles. Each of the remaining
(n − k) points destroys 1 and adds 3 new triangles, giving 2 additional triangles. The
total is (k − 2) + 2(n − k) = (2n − 2 − k).
• Since VoD is a planar graph, its dual also is a planar graph.
• The critical (and surprising) fact of the Delaunay property is that the dual graph
is realizable with straight line edges and original sites as vertices (without causing
intersections) and forms a triangulation.
• The duality is reversible, and so we can also compute the Voronoi Diagram from the
Delaunay Triangulation: the Voronoi vertices are the circumcenters of DT triangles,
and edges are bisectors of DT edges.
Properties.
• Read Chapter 9 of the book.
• Delaunay triangulations have many nice and surprising geometric properties, which
make them a worthy topic of research on their own, not just an after thought as
Voronoi duals.
• Empty Circle Property: Each triangle 4pqr of the DT (P ) has the following nice
property: the circumcircle of 4pqr does not contain any other site of P .
• The existence such a triangulation seems too good to be true: can every point set be
triangulated so that each of its triangles has the Empty Circle property?
• Many applications use triangulations to interpolate function values over the domain
from a finite number of sample points (sites). “Thin” triangles are bad approximators
for interpolation.
• Finite Element Method, Mesh Generation etc also favor well-rounded triangles.
• Among the exponentially many possible triangulations of a point set, the DT has many
nice properties, including the following:
2
1. Let α(T ) be the smallest angle in the triangulation T . (If the triangulation has
m triangles, it has 3m angles, and α(T ) is the smallest of them.) Then, DT is
the triangulation that achieves the maximum value of α().
2. Let A(T ) = (α1 ≤ α2 ≤ . . . ≤ αm ) be the angle vector of a triangulation T ,
namely, the ascending angle sequence. Then, DT achieves the lexicographically
largest angle vector.
3. For every edge pi pj in DT, there is a circle passing through pi and pj that is empty
of all other sites.
4. If pi , pj is the closest pair, then pi pj is an edge in the DT graph.
5. The Minimum Spanning Tree of P is a subgraph of DT (P ).
6. Etc etc.
Empty Circle Property
• We begin with an easier claim about circumcircles of DT edges, and show how it follows
from the relationship to Voronoi diagram.
• Claim: A pair (pi , pj ) is an edge of DT if and only if there exists an empty circle
passing through pi , pj .
• Proof. To prove this, we show that pi , pj satisfies the empty circle condition if and
only if V (pi ) ∩ V (pj ) 6= ∅.
1. First, if V (pi ) ∩ V (pj ) 6= ∅, then pick any point x on the shared edge eij = V (pi ) ∩
V (pj ). By property of the Voronoi diagram, we have d(x, pi ) = d(x, pj ) < d(x, pk ),
for any k 6= i, j. Therefore, the circle with center at x and radius d(x, pi ) satisfies
the empty circle claim.
2. On the other hand, if C is an empty circle passing through pi , pj , then let x be
its center. Since d(x, pi ) = d(x, pj ), we must have x ∈ V (pi ) ∩ V (pj ). Since P is a
finite point set in non-degenerate position, we can move x infinitesimally without
violating the empty circle condition. This shows that x lies on an edge that is on
the common boundary of V (pi ) and V (pj ).
• We now show that all the edges satisfying the empty circle property together give us
the DT!
3
Local vs. Global Delaunay.
• Consider a triangulation T of P .
• We say an edge ab ∈ T is locally Delaunay if
– either ab is an edge of the convex hull,
– or the apex of each triangle incident to ab lies outside the circumcircle of the other
triangle.
– More specifically, if the triangles incident to ab are 4abc and 4abd, then d must
lie outside the circle defined by abc, and vice versa.
• Figure.
• We say T is globally Delaunay if the circumcircle of each of its triangles is empty of
other sites.
• The locally Delaunay condition only checks for empty-circle property against neighboring triangles, and is applied to individual edges.
• But surprisingly the following theorem holds.
• Theorem: If all edges of T are locally Delaunay, then T is globally Delaunay.
• We skip the proof, which uses power of circles.
Lawson Flip Algorithm
• Start with an arbitrary triangulation T of P .
• Push all edges of T onto a Stack, and Mark them.
• while Stack non-empty, do
– Pop the top edge ab and unmark it
– If ab is not locally Delaunay, then swap it with the other diagonal
– If any of the four edges, ac, ad, bd, bc is unmarked and no longer locally Delaunay,
mark and push onto the Stack.
• We want to show that “flipping is always possible as long there is an illegal edge.”
• In particular, if one diagonal is not locally Delaunay, then the other one is.
4
• Let us recall a few facts about circle geometry (Thales Theorem).
– [Fast 1:] Consider a chord ab in a circle, and let p, q, r, s be four points lying on
the same side of the line defined by ab, where p, q lie on the circle, r inside the
circle, and s outside. Then, the angles formed by ab at them have the following
ordering:
6
r >
6
p =
6
q >
6
s
– [Fact 2:] Opposite pairs of interior angles of an inscribed (cyclic) quadrilateral
sum to 180 deg.
• Now suppose that ab is not locally Delaunay, and in particular the circle formed by
abc has d inside.
• Let x1 , x2 , x3 be the angles of the 4abc at a, c and b. Similarly, let y1 , y2 , y3 be the
angles of the 4abd at a, d and b.
• By triangle rule, we have x1 + x2 + x3 = π and y1 + y2 + y3 = π.
• By Facts 1 and 2, we observe that x2 + y2 > π. (If d were on the circle, the two angles
would have summed to π.)
• Therefore, we have (x1 + y1 ) + (x3 + y3 ) < π.
• Now consider the circumcircle for 4acd. The opposite apex b must be outside the
circle since the angles at a and b sum to (x1 + y1 ) + (x3 + y3 ) < π. (Apply Thales
theorem for the chord cd!)
• Thus, upon termination, the Lawson algorithm has a triangulation that is globally
Delaunay.
• How long does it take?
• Theorem: Lawson’s flip algorithm terminates in O(n2 ) steps.
• Proof is non-trivial. We will later establish it using a duality transform.
5
Applications
• Proof of MST Claim.
• Prim’s algorithm uses the cut rule to find the cheapest edge across a cut.
• Suppose some points have been connected by Prim’s algorithm. Color them blue, and
the rest red.
• We claim that the shortest edge connecting a blue b to a red point r is an edge in DT.
• Consider the circle whose diameter is rb. There cannot be any other site inside this
circle, because that would form a shorter red-blue link.
• This circle is the certificate that br is an edge in DT .
• What do we gain? DT has O(n) edges, while the full graph has O(n2 ) edges. So,
we can find the MST of n points in the plane in O(n log n) time, without constructing
the entire distance graph.
Nearest Neighbors
• The nearest neighbor graph. Join two points pi and pj if one is the nearest neighbor
of the other.
• This is not a symmetric relation.
• But it’s easy to see that NN graph is a subgraph of DT.
Largest Empty Circle
• Given a set of n points in the plane, find the largest empty circle, with center inside
the convex hull.
• Applications: dump site, location of a new store, etc.
• The center is either a vertex of the Voronoi diagram, or lies where a Voronoi edges
meets the convex hull.
6