Computing the Delaunay Triangulation

Download Report

Transcript Computing the Delaunay Triangulation

Computing the
Delaunay
Triangulation
By Nacha Chavez
Math 870
Computational Geometry; Ch.9; de Berg, van
Kreveld, Overmars, Schwarzkopf
Motivation
 When talking about mapping the surface of
the Earth, it is unrealistic to assume there is
no relief.
 Need a method that approximates the peaks
and valleys of a surface with a limited
number of sample points efficiently and
produces something that appears natural.
Approach
1) Model a set of data points by first
determining a Triangulation of P. (This is
our main focus!)
2) Lift each sample point to its appropriate
height
3) Result: Polyhedral terrain approximating
the original terrain.
Quic kT ime™ and a
T IFF (LZW) dec ompress or
are needed to s ee this picture.
Quic kT ime™ and a
T IFF (LZW) dec ompress or
are needed to s ee this picture.
Qui ckT ime™ and a
T IFF (LZW) dec ompress or
are needed to s ee this pic ture.
Our Big Questions
1) How do we triangulate a set of sample points?
There are many different possibilities!
2) Which triangulation is the most appropriate to
approximate a terrain?
No definitive answer. But, with a set of data, we
can create a criterion that will aid us in finding
the most natural approximation.
The Main Criterion
Maximize the minimal angle of every triangle
in our triangulation.
This is in fact, the
Delaunay Triangulation!
First, some definitions
 Terrain: A 2-D surface in 3-D space such that
every vertical line intersects it in a point, if it
intersects at all.
 Triangulation of P: A planar subdivision whose
bounded faces are triangles and whose vertices are
the points of P, where
P  p1, p2 , , pn .
 Maximal Planar Subdivision: A subdivision S such
that no edge connecting two vertices can be added
to S without destroying its planarity.
 Plane Graph: No two edges in the embedding
cross.
Redefining . . .
 Triangulation of P: The maximal planar
subdivision whose vertex set is P.
How We Compare
Triangles
 First, we need the notion of comparing
angles.
 Angle-Vector of T: AT   1,2 , , 3m  is
the angle-vector of T where T is the
triangulation of P and 1, 2 , , 3m is the list
of 3m angles in T sorted by increasing
angle.
Compare Triangles . . .
 A T   A T   : Let T and T  be triangulations of a
point set P where AT   1,2 , , 3m  and
AT    1,2 , , 3m
  are the corresponding
angle-vectors. Then we say the angle-vector of T
is larger than the angle-vector of T  if A T is
lexicographically larger than A T  . This means if
there exists an index i with 1 i  3msuch that
 j   j for all j  i, and i  i
then A T   A T  .
Compare Triangles . . .
 Angle-optimal: Our triangulation and
corresponding angles are defined as in the
previous slide. Then we say the
triangulation T is angle-optimal if
A T   A T   .
Compare Triangles . . .
 Thale’s Theorem (9.2): Denote the smaller
angle defined by three points p, q, r by pqr.
Let C be a circle, l be a line intersecting C
in points a and b, and p, q, r, and s points
lying on the same side of l. Suppose that p
and q lie on C, that r lies inside C, and that s
lies outside C. Then
arb  apb  aqb  asb.
Making a legal
Triangulation
 Edge Flip: If an edge e is not an edge of the
unbounded face of P, then it is incident to
two triangles pi p j pk and pi p j pl . If these two
triangles form a convex quadrilateral, we
can obtain a new triangulation T  by
removing pi p j from T and inserting pk pl
instead. This is called an edge flip.
Legal Triangulation . . .
 Illegal Edge: We call the edge e  pi p j an
illegal edge if
mini  mini .
1i6
1i6
 It turns out though, computing angles is
unnecessary. Instead, the following lemma
introduces criterion based on edges. The
correctness of this lemma follows directly
from Thale’s Theorem.
Legal Triangulation
 Lemma 9.4: Let edge pi p j be incident to
triangles p i p j pk and p i p j pl , and let C be the
circle through p i , p j , and pk . The edge pi p j is
illegal if and only if the point pl lies in the
interior of C. Furthermore, if the points
p i , p j , pk , pl form a convex quadrilateral
and do not lie on a common circle, then
exactly one of pi p j and pk pl is an illegal
edge.
Legal Triangulation
 Legal Triangulation: A triangulation that
does not contain any illegal edges.
The Delaunay
Triangulation
Why We Trust DG(P)
 We first must introduce the Voronoi
Diagram of P:
The subdivision of the plane P into n
regions, one for each site (point) in P, such
that the region of a site p P contains all
points in the plane for which p is the closest
site. We denote this as Vor(P).
Understanding DG(P) . . .
 Delaunay Graph of P: The strait line
embedding of a graph G, which has a line
connecting two nodes if their corresponding
Voronoi cells share an edge, denoted as
DG(P).
 Theorem 9.5: The Delaunay graph of a
planar point set is a plane graph.
(No two edges in the embedding cross!)
Understanding DG(P) . . .
 General Position: We say that a set of
points in general position if it contains no
four points on a circle. Therefore, P in
general position means every vertex of the
Voronoi diagram has degree three, and
consequently all bounded faces of DG(P)
are triangles.
Understanding DG(P) . . .
 Theorem 9.6: Let P be a set of points in the plane.
(i) Three points p i , p j , pk P are vertices of the
same face of the Delaunay graph of P if and
only if the circle through p i , p j , pr contains
no point of P in its interior.
(ii) Two points p i , p j P from an edge of the
Delaunay graph of P if and only if there is a
closed disc C that contains pi and p j on its
boundary and does not contain any other point
of P.
Understanding DG(P) . . .
 Theorem 9.7: Let P be a set of points in the
plane, and let T be a triangulation of P.
Then T is a Delaunay triangulation of P if
and only if the circumcircle of any triangle
of T does not contain a point of P in its
interior.
 Theorem 9.8: Let P be a set of points in the
plane. A triangulation T of P is legal if and
only if T is a Delaunay triangulation of P.
The Big Conclusion
 Theorem 9.9: Let P be a set of points in the
plane. Any angle-optimal triangulation of P
is a Delaunay triangulation of P.
Furthermore, any Delaunay triangulation of
P maximizes the minimum angle over all
triangulations of P.
Computing DG(P)
 We first begin by creating three new points
to add to P, which is the set   p1, p2 , p3 .
 These points are chosen far enough away from our
point set so that when they are removed at the end
of our algorithm, they do not destroy the
triangulation created. (This means they do not lie
on any circle defined by three points in P.)
 The Algorithm is randomized incremental, which
means our vertex points are entered randomly, and
a Delaunay triangulation is maintained for the
current point set.
Computing DG(P) . . .
 When a point pr is added to our point set,
we must find the triangle that contains our
point pr then add lines from pr to the
vertices of this triangle. We have two cases
p
to consider:
i
pk
pk
pr
pi
pl
pj
pr
pj
The Algorithm
 It is simple:
i) Add 3 points to P that surround our set.
ii) Choose a point pr and add edges.
iii)Check edges, if illegal, flip.
iv) Remove 3 points added in i).
v) Return triangulation of P.
But, Why Does It Work?
 Correctness of Algorithm:
Must show no illegal edge left behind!
1. We see that every new edge added is incident to
our point pr .
2. We will see that every new edge added is in fact
legal!
3. Combine 2) with the fact that any edge may
become illegal only if it is incident to a triangle
that has changed, then our algorithm tests any
edge that may become illegal.
Why Every Added Edge is
Legal
 Lemma 9.10: Every new edge created in
DELAUNAYTRIANGULATION or in
LEGALIZEEDGE during the insertion of pr is
an edge of the Delaunay graph of
  p1,..., pr .
Thus, our algorithm is correct!
Two More Points!
 How we find pr .
 How to choose   p1, p2 , p3  and
decide if an edge is illegal.
Complexity
 Theorem 9.12: The Delaunay triangulation
of set P of n points in the plane can be
computed in O(nlogn) expected time, using
O(n) expected storage.
Revisit Our Diagrams
Quic kT ime™ and a
T IFF (LZW) dec ompress or
are needed to s ee this picture.
Quic kT ime™ and a
T IFF (LZW) dec ompress or
are needed to s ee this picture.
Voroini Diagram
Delaunay Graph
Qui ckT ime™ and a
T IFF (LZW) dec ompress or
are needed to s ee this pic ture.
Approximated Terrain
Final Thoughts . . .
 We now have an efficient algorithm for triangulating
planar point sets.
 Applications:
1. geosciences
<http://www.ncgia.ucsb.edu/conf/SANTA_FE_CDROM/sf_papers/lattuada_roberto/paper.html>
2. wireless networks
<http://csdl2.computer.org/persagen/DLAbsToc.jsp?resourcePath=/dl/trans/td/&toc=
comp/trans/td/2003/10/lxtoc.xml&DOI=10.1109/TPDS.2003.1239871>
3. list of multiple uses of Delaunay
<http://www.ics.uci.edu/~eppstein/gina/delaunay.html>
4. site to generate Delaunay triangulation
<http://www.dlc.fi/~dkpa/>
References
 De Berg et.al. Computational
Geometry. Springer-Verlag, 2000.
 Fukuda, Komei. Frequently Asked
Questions in Polyheral Computation.
2004ftp://ftp.ifor.math.ethz.ch/pu
b/fukuda/reports/polyfaq040618.p
df
 Previous websites