.poly format.poly format devised by Shewchuk, generalized in
one of many obvious ways to higher dimension, to describe a full PLC input.
The format is a text file in several sections, one per dimension: a 3d
.poly file has three sections -- the node section, the segment
section, and the polygon section. Empty lines are ignored, as is anything
on the same line after a '#' comment character. The amount or type of
whitespace is insignificant. Here is an example file:# nodes 6 2 0 0 1 0 0 2 0 1 3 1 0 4 1 1 5 0.5 0.5 6 0.6 0.7 # segments 5 1 1 2 2 2 3 3 3 4 4 4 1 5 5 6
Segment header: n [optional ignored field]
The header simply lists the number of segments. There is an optional
field, for compatibility with other codes, which SVR ignores.
Each segment: ID a b
IDs must be consecutive, and can start anywhere. For your files to be
compatibile with Triangle and Pyramid, segment IDs should start at the same
value as where node IDs started.
Polytope header: n
The header mentions the number of polytopes in the current dimension.
Each polytope: ID n a b ...
The ID field is as usual. Next is the number of lower-dimensional facets
that bound the polytope: a polygon is described by a number of segments.
Finally, a list of IDs for the facets.