Format of the object files (.pts)

Each object is formed by creating an polygonal mesh using a bidimensional matrix of 3D points. Each point is connected with it's horizontal and vertical neighbours, as shown by the following drawing:

   o----o----o----o----o----o-- ... --o
   |    |    |    |    |    |         |
   o----o----o----o----o----o-- ... --o
   |    |    |    |    |    |         |
   o----o----o----o----o----o-- ... --o
   |    |    |    |    |    |         |
   o----o----o----o----o----o-- ... --o
   |    |    |    |    |    |         |
   .    .    .    .    .    .         .                             
   .    .    .    .    .    .         .                             
   .    .    .    .    .    .         .                             
   |    |    |    |    |    |         |
   o----o----o----o----o----o-- ... --o
 

The contents of the pts files it's nothing more than a listing of the matrix that composes the object. In the header of the file there are three lines with information about the matrix dimensions and object topology. After that you have the matrix's points, one by line and the matrix filling should be done by lines.

If the flag is 1, it means that the last column column connects to the first one, making a closed object.

Example:

1ª line: Number of lines in the matrix
2ª line: Number of columns in the matrix
3ª line: flag (0 or 1)
4ª line: X11 Y11 Z11
5ª line: X12 Y12 Z12
...