TRIANGULATION_DELAUNAY_DISCREPANCY, a MATLAB program which computes the local Delaunay discrepancy of a triangulation.
A (maximal) triangulation is Delaunay if and only if it is locally Delaunay.
A triangulation is Delaunay if the minimum angle over all triangles in the triangulation is maximized. That is, there is no other triangulation of the points which has a larger minimum angle.
A triangulation is locally Delaunay if, for every pair of triangles that share an edge, the minimum angle in the two triangles is larger than the minimum angle in the two triangles formed by removing the common edge and joining the two opposing vertices.
This function examines the question of whether a given triangulation is locally Delaunay. It does this by looking at every pair of neighboring triangles and comparing the minimum angle attained for the current triangle pair and the alternative triangle pair.
Let A(i,j) be the minimum angle formed by triangles T(i) and T(j), which are two triangles in the triangulation which share a common edge. Let B(I,J) be the minimum angle formed by triangles S(i) and S(j), where S(i) and S(j) are formed by removing the common edge of T(i) and T(j), and joining the opposing vertices.
Then the triangulation is Delaunay if B(i,j) <= A(i,j) for every pair of neighbors T(i) and T(j).
If A(i,j) < B(i,j) for at least one pair of neighbors, the triangulation is not a Delaunay triangulation.
This program returns VALUE = min ( A(i,j) - B(i,j) ) over all triangle neighbors. VALUE is scaled to be in degrees, for comprehensibility. If VALUE is negative, then at least one pair of triangles violates the Delaunay condition, and so the entire triangulation is not a Delaunay triangulation. If VALUE is nonnegative, then the triangulation is a Delaunay triangulation.
It is useful to return VALUE, rather than a simple True/False value, because there can be cases where the Delaunay condition is only "slightly" violated. A simple example is a triangulation formed by starting with a mesh of squares and dividing each square into two triangles by choosing one of the diagonals of the square. The Delaunay discrepancy for this mesh, if computed exactly, is 0, but roundoff could easily result in discrepancies that were very slightly negative.
If VALUE is positive, and not very small in magnitude, then every pair of triangles in the triangulation satisfies the local Delaunay condition, and so the triangulation is a Delaunay triangulation.
If VALUE is negative, and not very small in magnitude, then at least one pair of triangles violates the Delaunay condition, and to a significant degree. The triangulation is not a Delaunay triangulation.
If the magnitude of VALUE is very close to zero, then the triangulation is numerically ambiguous. At least one pair of triangles violates or almost violates the condition, but no triangle violates the condition to a great extent. The user must judge whether the violation is significant or not.
triangulation_delaunay_discrepancy ( 'prefix' )where 'prefix' is the common prefix for the node and element files
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
TRIANGULATION_DELAUNAY_DISCREPANCY is available in a C++ version and a FORTRAN90 version and a MATLAB version.
TABLE_DELAUNAY, a MATLAB program which triangulates a set of nodes whose coordinates are stored in a file.
TRIANGLE, a C program which computes a triangulation of a geometric region.
TRIANGULATION, a MATLAB library which carries out various operations on order 3 ("linear") or order 6 ("quadratic") triangulations.
TRIANGULATION_BOUNDARY_EDGES, a MATLAB program which reads data defining a triangulation, determines which edges lie on the boundary, organizes them into connected components, and writes this information to a file.
TRIANGULATION_BOUNDARY_NODES, a MATLAB program which reads data defining a triangulation, determines which nodes lie on the boundary, and writes their coordinates to a file.
TRIANGULATION_CORNER, a MATLAB program which patches triangulations so that no triangle has two sides on the boundary.
triangulation_delaunay_discrepancy_test
TRIANGULATION_HISTOGRAM, a MATLAB program which computes histograms of data over a triangulation.
TRIANGULATION_L2Q, a MATLAB program which reads data defining a 3-node triangulation and generates midside nodes and writes out the corresponding 6-node triangulation.
TRIANGULATION_MASK, a MATLAB program which takes an existing triangulation and deletes triangles and their corresponding nodes as requested by the user.
TRIANGULATION_ORDER3, a directory which contains a description and examples of order 3 triangulations.
TRIANGULATION_ORDER6, a directory which contains a description and examples of order 6 triangulations.
TRIANGULATION_ORIENT, a MATLAB program which reads data defining a triangulation, makes sure that every triangle has positive orientation, and if not, writes a corrected triangle file.
TRIANGULATION_PLOT, a MATLAB program which reads data defining a triangulation and creates a PostScript image of the nodes and triangles.
TRIANGULATION_Q2L, a MATLAB program which reads data defining a 6-node triangulation, and subdivides each triangle into 4 3-node triangles, writing the resulting triangulation to a file.
TRIANGULATION_QUAD, a MATLAB program which estimates the integral of a function over a triangulated region.
TRIANGULATION_QUALITY, a MATLAB program which reads data defining a triangulation and computes a number of quality measures.
TRIANGULATION_RCM, a MATLAB program which reads data defining a triangulation, determines an ordering of the nodes that will reduce the bandwidth of the adjacency matrix, and writes the new triangulation information to a file.
TRIANGULATION_REFINE, a MATLAB program which reads data defining a triangulation, replaces each triangle by four congruent smaller ones, and writes the new triangulation information to a file.
TRIANGULATION_TRIANGLE_NEIGHBORS, a MATLAB program which reads data defining a triangulation, determines the neighboring triangles of each triangle, and writes that information to a file.