The .poly format

SVR uses the .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

Node section (dimension 0)

The format of the node section is identical to that of the .node format.

Segments section (dimension 1)

The segments section denotes a set of segments that must appear in the output, possibly subdivided into subsegments. Recall that the segments must intersect at obtuse or right angles for SVR to provably terminate; this is not checked (and, sometimes, acute angles will accidentally work). Note also that points from the node section must not be allowed to lie on a segment of which they are not an endpoint.

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.

Polygons section and higher polytopes (dimension i > 1)

Dimensions two and above all share the following format:

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.

Specifying holes

SVR does not currently explicitly support specifying holes or non-convex shapes. Instead, holes are discovered during a cleanup phase. There are known bugs in the cleanup phase at the moment.
Back to SVR home
Last modified by Benoît Hudson
Tue Jan 15 17:09:32 CST 2008