**triangulation_orient_test**,
a MATLAB code which
calls triangulation_orient(), which
reads a triangulation, and reorient each triangle that
has a negative area. If at least one such triangle is encountered,
the program writes out a new copy of the triangle file in which
all the triangles have been correctly oriented.

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

triangulation_orient, a MATLAB code which ensures that the triangles in an order 3 or order 6 triangulation have positive orientation;

- triangulation_orient_test.m, calls all the tests.
- triangulation_orient_test.sh, runs all the tests.
- triangulation_orient_test.txt, the output file.

**P15** is a triangulation created by DISTMESH.
Unfortunately, 512 of the triangles have a negative orientation.
In this example, TRIANGULATION_ORIENT was used to reorient
those triangles.

- p15_nodes.txt, a set of nodes.
- p15_elements.txt, a set of order 3 triangles.
- p15_orient_elements.txt, the set of order 3 triangles after TRIANGULATION_ORIENT has reoriented them.