A Fast Algorithm for Constructing Delaunay Triangulations in the Plane

A Fast Algorithm for Constructing Delaunay Triangulations in the Plane

A fast algorithm for constructing Delaunay triangulations in the plane S. W. SLOAN Department of C~vilEngineering and Surveying, The University of Newcastle, NSW 2308, Australia points associated with each of these' polygons form a This paper describes an algorithm for computing Delaunay triangle. By definition, each vertex of a Delaunay triangulations of arbitrary collections of Dirichlet tessellation a equidistant from each of the points in the plane. A FORTRAN 77 implementa- three data points forming the Delaunay triangle. Thus, tion of the scheme is given. For N points distri- each vertex of the Dirichlet tessellation is uniquely buted randomly within a square domain, the associated with a Delaunay triangle and is located at its expected run time for the algorithm is approxi- circumcentre. When the Delaunay triangulation is mately 0(NS/4). Empirical tests, for N up to 10 000, complete, this means that no data point may lie inside the indicate that the actual run time is substantially circumcircle of any triangle. less than this prediction and is generally better Generally speaking, the Delaunay triangulation than 0(NX'a). Excluding the memory required to associated with an arbitrary set of points in the plane is store the co-ordinates, the algorithm requires unique7 'a In some instances, however, the triangulation slightly greater than 14N words of integer memory may not be unique and is said to be degenerate. A very simple example which illustrates a degenerate triangulation to complete a typical triangulation. The efficiency is shown in Fig. 2, where four data points are located at of the proposed algorithm is verified by comparing the vertices of a square. The single vertex of the Dirichlet its performance with other Delaunay triangulation tessellation is located at the centroid of the square where procedures. Uses of the algorithm include the four polygons meet. Two different Delaunay triangulations generation of f'mite element meshes and the con- are possible with this configuration and both are equally struction of contour plots. valid. In practical algorithms, the problem of degeneracy is easily dealt with by making an arbitrary choice between Key Words: Delaunay, triangulation, algorithm. alternative triangulations and does not pose any serious difficulties. INTRODUCTION The problem of triangulating arbitrary collections of points in the plane occurs frequently in engineering and examples include mesh generation for finite element analysis and the construction of contour plots. The theory of Delaunay triangulations has been described previously I but will be discussed briefly for completeness. To describe the construction of a Delaunay triangulation it is convenient to consider the corresponding Dirichlet tesselation. The Dirichlet tessellation for five points in the plane is shown in Fig. 1 and is denoted by the heavy lines. This tessellation divides the plane into a collection of polygonal regions whose boundaries are the perpendicular bisectors of the lines joining the neigh- bouring data points. Each polygon is associated with a single data point. Any location within a given polygon is closer to the polygon data point than any other data point. The Delaunay triangulation that corresponds to the Dirichlet tessellation is constructed by connecting all data points that share a polygon boundary. The Delaunay triangulation for the five points in Fig. 1 is indicated by the faint lines. In general, the vertices of the Dirichlet tessellation occur where three adjacent polygons meet. The three data Accepted April 1986. Discussion closes March 1987. Figure 1. The Diriehlet tessellation and del-triangulation 0141-1195/87/010034-22 $2.00 34 Adv. Eng. Software, 1987, Vol. 9, No. 1 © 1987 Computational Mechanics Publications implement. FORTRAN code for the Cline and Renka 7 algorithm has been made publicly available by Renka s and a simple FORTRAN 77 implementation of the Watson 6 scheme is described in Sloan and Houlsby.9 Watson's algorithm, which is quite efficient for triangulating up to about 2000 points, has the advantage of being / particularly simple. This paper describes a simple scheme which may be used to compute Delaunay triangulations for both small and large sets of points. Analysis of the algorithm indicates that its run time is 0(N s/4) for points that are distributed randomly within a square domain. / Empirical comparisons with other procedures suggest that it is efficient. OUTLINE OF ALGORITHM The algorithm combines features of both the Watson 6 and Lawson2 procedures. The Delaunay triangulation is assembled by introducing each point, one at a time, into an existing Delaunay triangulation which is then updated. Following the idea of Watson, the process is started by selecting three points to form a 'supertriangle' which completely encompasses of all of the data points to be triangulated. Initially the Delaunay triangulation is thus comprised of a single triangle defined by the supertriangle vertices. When a new point P is introduced into the triangu- lation, we first find an existing triangle which encloses P and form three new triangles by connecting P to each of its vertices. Note that during this step the original enclosing triangle is deleted and the net gain in the total number of triangles is two. After the new point P has been inserted, the existing triangulation is updated to a Delaunay triangu- lation using the swapping algorithm of Lawson. 2 In this procedure all the triangles which are adjacent to the edges opposite P are placed on a last-in, first-out stack (ie. a Figure 2. Degenerate Delaunay triangulations maximum of three triangles are placed on the stack initially). Each triangle is then unstacked, one at a time, and a check is made to determine if P lies inside its circumcircle. If this One of the advantages of Delaunay triangulations, as is the case then the triangle containing P as a vertex and opposed to triangulations constructed heuristically, is that the adjacent triangle form a convex quadrilateral with the they automatically avoid forming triangles with small diagonal drawn in the wrong direction, and it must be included angles whenever this is possible. Indeed Lawson2 replaced by the alternative diagonal to preserve the and Sibson 3 have shown that Delaunay triangulations are, structure of the Delaunay triangulation. The swapping by definition, locally equiangular. This means that for procedure replaces two old triangles with two new every convex quadrilateral formed by two adjacent triangles with no net gain in the total number of triangles. triangles, the minimum of the six angles in the two Once the swap is completed, any triangles which are now triangles is greater than it would have been if the opposite P are added to the stack (there are a maximum of alternative diagonal had been drawn and the other pair two). The next triangle is then unstacked and the whole of triangles chosen. Because of this property, Delaunay process is repeated until the stack is empty and this results triangulations are particularly suited to grid generation in a new Delaunay triangulation containing the point P. for finite element analysis and contouring algorithms. An illustration of the swapping procedure is shown in A number of algorithms for construct'mg planar Fig. 3. Note that if P lies outside (or on) the circumcircle Delaunay triangulations have been proposed. 1'2'4-7 For a for a stacked triangle, then no action is taken and we collection of N points, the average and worst case run times for the various algorithms are shown in Table 1. In engineering applications the average performance of a Table l. Average and worst case running times for various triangulation algorithm is generally more important than Delaunay triangulation algorithms its worst case performance, since the latter tends to occur rarely in practice.4 Average run times for triangulation Algorithm Average ease Worst ease algorithms are usually deduced by considering collections Green and Sl'bson 0(N,/2) 0(N 2) of points located randomly within square or circular Lawson 0(N4t 3) 0(N 2) domains. Lee and Schachter (1) 0(N log2N) 0(N log2N) For large sets of points, the results in Table 1 indicate Lee and Schachter (2) 0(N3t 2) 0(N 2) that the first algorithm of Lee and Schachter4 (these Bowycr 0(N3/2) 0(N 2) Watson 0(N3/2) 0(N 2) authors propose two algorithms) is the most efficient. Cline and Renka 0(N 4~3) 0(N 2) This procedure, however, is complicated and difficult to A dr. Eng. Software, 198 7, Vol. 9, No. 1 35 of these arrays are two-dimensional, with V containing the vertices for each triangle and E containing the adjacent triangles. The conventions for this data structure are shown for a simple example in Fig. 4. The dimensions of these arrays are 1I(3, 2*N+ 1) and E(3, 2*N+ 1). t ~> p.,r '~ }"/ irian t \y, At the beginning of subroutine DELTRI, the co- ordinates of the points to be triangulated are normalised to ,~ adjacent triangte .... the values (3¢, ~) according to Z'circurncircle for :~p = (Xp -- XMIN)/DMAX adjacent triangle .~p = (vp -- YMIN)/DMAX Figure 3. Lawson's swapping algorithm where DMAX = MAX(XMAX - XMIN, YMAX -- YMIN) simply skip to the next triangle on the stack. It has been and shown by Lawson 2 that this iterative algorithm must result XMIN = MIN {Xp} in a Delaunay triangulation and will always terminate after a finite number of swaps. Typically only a few levels of XMAX = MAX {Xp} P e LIST swaps are necessary for each edge which is initially opposite YMIN = MIN {yp} P and the process is thus efficient. After all the points have been added to the triangulation, YMAX = MAX {yp} the final Delaunay triangulation is obtained by removing all This ensures that the values of ~ and)? lie between 0 and 1 of the triangles that contain one or more of the super- and proves convenient in the triangulation process.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    22 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us