POLYGON
Examples of Polygons


POLYGON is a dataset directory which contains examples of a few polygons.

A polygon can be described by specifying a set of N vertices, with the understanding that the shape is created by connecting vertex 1 to 2, 2 to 3, and so on, and finally connecting vertex N to vertex 1.

Thus, the simplest description of a polygon would be to supply a node file, containing in sequence the coordinates of each vertex.

A more flexible description would supply a node file and an element file. In this case, the polygon would be understood to be created by drawing a sequence of edges, which are perhaps not given in any particular order. The edges are described in the element file. Each line of the element file contains the indices of two nodes that are to be joined. Thus, on the one hand, the element file can choose a subset of the nodes to be used in the polygon; on the other, we don't automatically have a guarantee that a closed figure will be formed.

Licensing:

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

Related Data and Programs:

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

GEOMETRY, a C++ library which performs geometric calculations in 2, 3 and M dimensional space.

TRIANGULATE, a C program which triangulates a (possibly nonconvex) polygon, by Joseph ORourke.

TRIANGULATE, a MATLAB program which triangulates a (possibly nonconvex) polygon, based on a C program by Joseph ORourke.

Reference:

Datasets:

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 defines a "snake" polygon.

SQUARE defines a square.

STAR is a star formed using 10 vertices.

TRIANGLE defines a triangle.

You can go up one level to the DATASETS directory.


Last revised on 11 April 2011.