# Polygon file format

The format of these polygon files is as follows. There is a 5-line
header, followed by a bunch of polygons.

## File Header

The file header has 5 lines, some of which contain relevant
information, italicized below:
`polygons `*name*
`Number of polygons: `*n_polys*

where *n_polys*
is the total number of polygons in the file
`Number of coordinates per vertex: `*n_ccords*

where *n_ccords* is the number of coordinates for each vertex.
This can be 3 (position only), 6 (position and normal), 8 (position,
normal, and texture coordinates, or 5 (position, texture coordinates,
but no per-vertex normal)
`Each polygon: `

Ignore this line
`Each vertex: `

Ignore this line

## Each Polygon

each polygon starts with a descriptive line:

*n_verts norm_x norm_y norm_z r g b id*

where
*n_verts* is the number of vertices in this polygon
*(norm_x,norm_y,norm_z)* is the vector normal to the plane
of the polygon
*(r,g,b)* is the RGB color of the polygon
*id* is some sort of ID; ignore it.

Then each vertex has 3, 5, 6, or 8 floating-point values.

Stephen H. Westin westin@graphics.cornell.edu
Last modified: Fri Mar 16 13:42:14 EDT 2018