triangulation_delaunay_discrepancy, an Octave code 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 MIT license
triangulation_delaunay_discrepancy is available in a C++ version and a Fortran90 version and a MATLAB version and an Octave version.
triangulation_delaunay_discrepancy_test
table_delaunay, an Octave code which triangulates a set of nodes whose coordinates are stored in a file.
triangulation, an Octave code which carries out various operations on order 3 ("linear") or order 6 ("quadratic") triangulations.
triangulation_boundary_edges, an Octave code 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, an Octave code which reads data defining a triangulation, determines which nodes lie on the boundary, and writes their coordinates to a file.
triangulation_corner, an Octave code which patches triangulations so that no triangle has two sides on the boundary.
triangulation_histogram, an Octave code which computes histograms of data over a triangulation.
triangulation_l2q, an Octave code which reads data defining a 3-node triangulation and generates midside nodes and writes out the corresponding 6-node triangulation.
triangulation_mask, an Octave code 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, an Octave code which reads data defining a triangulation, makes sure that every triangle has positive orientation, and if not, writes a corrected triangle file.
triangulation_plot, an Octave code which reads data defining a triangulation and creates a postscript image of the nodes and triangles.
triangulation_q2l, an Octave code 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, an Octave code which estimates the integral of a function over a triangulated region.
triangulation_quality, an Octave code which reads data defining a triangulation and computes a number of quality measures.
triangulation_rcm, an Octave code 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, an Octave code 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, an Octave code which reads data defining a triangulation, determines the neighboring triangles of each triangle, and writes that information to a file.