Delaunaymt includes several algorithms for the construction and iterative modification of Delaunay triangulations and constrained Delaunay triangulation through vertex insertion or vertex removal. As a side effect, the program builds an MT from the sequence of local modifications performed.
The basic functionalities of the program are:
Vertices can be inserted / removed either in a
random order, or selected according to heuristic criteria which try to
achieve the least approximation error for a given number of triangles in
the current representation.
In the latter case, the next point to be inserted is the one that is likely
to decrease the approximation error as quickly as possible, and the the next
point to be removed is the one that is likely to increase the approximation
error as slowly as possible.
Moreover, approaches 3 and 4 can select either one vertex at a time for removal, or they can select a maximal set of vertices which can be removed simultaneously without interfering.
In all algorithms, the iterative process may stop either when a given percentage of the available vertices has been inserted / removed, or when the approximation error of the current model reaches a certain global approximation error.
Functionalities 1 and 3 are documented in the paper
[vis97].
Functionality 4 is briefly described here.
For a description of the format of point and triangulation files, see file formats).
format_string consists of a sequence of options:
The algorithm for refining a constrained Delaunay triangulation (opt_algo = m) is not suitable for MT construction. It only exist to provide a way for building a constrained triangulation to be decimated (with opt_algo = t). For this purpose, use the format string m r u num where num is the total number of points in the data file.
The syntax for the mandatory part is the following:
NumPoints // Number of points (INTEGER, greater or equal to 3) X1 Y1 Z1 // First point (three FLOATs) X2 Y2 Z2 // Second point (three FLOATs) ... Xn Yn Yn // Last point (three FLOATs), n = NumPointsThe syntax for the optional part is the following:
NumSegments // Number of segments (INTEGER, greater or equal to 0) I1 J1 // First segment (two INTEGERs) I2 J2 // Second segment (two INTEGERs) ... Im Jm // Last segment (two INTEGERs), m = NumSegmentsIntegers Ik and Jk are the indices of the two endpoints of the k-th segment in the previous list of vertices; the range of valid indices is [0,NumPoints-1].
The optional part, even if present, is not considered by algorithm 1.
The input for vertex-decimation algorithms (algorithms 3 and 4) is an ASCII file made up of a mandatory part containing a set of vertices and a set of triangles (together forming a triangulation), followed by an optional part containing a set of straight-line segments, subset of the triangulation edges (forming the constraints of a constrained triangulation).
The syntax for the mandatory part is the following:
NumPoints // Number of points (INTEGER, greater or equal to 3) X1 Y1 Z1 // First point (three FLOATs) X2 Y2 Z2 // Second point (three FLOATs) ... Xn Yn Yn // Last point (three FLOATs), n = NumPoints NumTriangles // Number of triangles (INTEGER, greater or equal to 1) I1 J1 K1 // First triangle (three INTEGERs) I1 J2 K2 // Second triangle (three INTEGERs) ... Xt Yt Yt // Last triangle (three INTEGERs), t = NumTrianglesIntegers Ik, Jk and Kk are the indices of the three vertices of the k-th triangle in the triangulation. The range of valid indices is [0,NumPoints-1].
The syntax for the optional part is the following:
NumSegments // Number of segments (INTEGER, greater or equal to 0) I1 J1 // First segment (two INTEGERs) I2 J2 // Second segment (two INTEGERs) ... Im Jm // Last segment (two INTEGERs), m = NumSegmentsIntegers Ik and Jk are the indices of the two endpoints of the k-th constraint segment in the previous list of vertices; the range of valid indices is [0,NumPoints-1].
The syntax of such file is the same as that of the input file for vertex-removal algorithms (see description above).
In case B a decimation algorithm (3 or 4) can be applied directly. In order to apply a refinement algorithm (1 or 2), just forget the existing triangles and reduce to a set of points.
Case C can be considered as a subcase of A or as a subcase of B, since it is straightforward to abtain a regular triangulation of the grid. A grid file usually contains just the height of the data points. Since Delaunaymt needs the x-y coordinates as well (it assumes to deal with scattered points) a conversion utility is provided. Another conversion utility produces x-y coordinates aa well as the triangles of a regular triangulation of the grid.
The two utility programs are: