TRIANGULATE
Triangulate a Polygonal Region


TRIANGULATE is a MATLAB program which triangulates a polygonal region. The region need not be convex.

The polygon is defined by an input file which gives the coordinates of the vertices of the polygon, in counterclockwise order.

Note that no two successive vertices can be equal, nor can the first and last vertices be equal.

The output of the program is a list of the "diagonal lines" defined by pairs of vertices which constitute the triangulation, a list of the nodes that form the triangles of the triangulation, and an image of the triangulated polygon.

The program is based on a C program by Joseph ORourke.

Usage:

triangulate ( 'prefix', 'animate' )
where reads the file and writes the files

Languages:

TRIANGULATE is available in a C version and a MATLAB version.

Related Data and Programs:

CONVEX_HULL, a MATLAB program which demonstrates the computation of the convex hull of a set of 2D points.

HAND_DATA, MATLAB programs which carry out some numerical exercises based on data that came from tracing several points on a person's hand.

POLYGON, a dataset directory which contains examples of polygons.

TRIANGLE, a C program which triangulates a set of points.

Reference:

Source Code:

Examples and Tests:

COMB is an example of a "comb" polygon of 10 vertices

HAND outlines a hand using 59 vertices.

I18 is an example of a complicated nonconvex polygon.

SNAKE is an example defining a "snake" polygon.

SQUARE is an example defining a square.

TRIANGLE is an example defining a triangle.

You can go up one level to the MATLAB source codes.


Last revised on 11 April 2011.