TRIANGULATE
Triangulate a Polygonal Region


TRIANGULATE is a C program which triangulates a polygonal region, by Joseph O'Rourke.

The region need not be convex. The polygon is defined by an input file which gives the coordinates of the nodes of the polygon, in counterclockwise order. The coordinates are expected to be integers.

No consecutive pair of vertices should be equal.

The output of the program is a PostScript file which shows the polygon and its triangulation. The text of the PostScript file includes comments that describe the triangulation in terms of the pairs of vertices that were connected to make each diagonal.

Usage:

triangulate < input.txt > output.ps
where

Languages:

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

Related Data and Programs:

POLYGON, a dataset directory which contains examples of polygons.

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

Author:

Joseph ORourke

Reference:

Source Code:

COMB generates a "comb" polygon, a somewhat tricky shape that can be used as an input to the triangulation program.

TRIANGULATE reads a file definining a polygon, and determines an appropriate triangulation.

Examples and Tests:

COMB10 is an example of a "comb" polygon of 10 vertices Files you may copy include:

I18 is an example of a complicated nonconvex polygon. Files you may copy include:

I19 is a copy of I18 with a pair of repeated vertices, which should cause the program to refuse to try to carry out the triangulation.

SNAKE is an example defining a "snake" polygon. Files you may copy include:

SQUARE is an example defining a square. Files you may copy include:

TRIANGLE is an example defining a triangle. Files you may copy include:

List of Routines:

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


Last revised on 11 April 2011.