Polygon File Help Page


Sample polygon files
  1. Cone
  2. Cow
  3. Biplane
  4. Apple
  5. Skull
  6. X29 plane
  7. Bishop
  8. BEETHOV
  9. bottle
Shift+left click to save the above files
How do you read the above files?

The first line in the file is showing what kind of file format is.
There are two kinds in those examples ('c' and 'n')
      e.g. "cone.dat" is 'n' type and "cow.dat" is 'c' type

In 'n' format:

The following data is extracted from cone.dat:
n                                               <- the format of this file 
40                                              <- # of the polygons
3                                               <- # of vertex of the first polygon
0 1 0 -2.98023e-09 0.0442792 1.86265e-08        <- first vertex of the first polygon
0.475528 0 0.154508 0.421121 -0.278604 0.136831 <- second vertex
0.5 0 0 0.442792 -0.278604 0                    <- third vertex
3                                               <- # of vertex of the second polygon
0 0 0 0 -1 0                                    <- first vertex of the second polygon
.                                               <- Now, I think you can figure out the rest
.
.
***********************
In 'c' format,
The following is an example of the 'c' format:
c                 <-- the format of this file
2                 <-- # of groups of polygons in this file
2                 <-- # of polygons in the first group
4                 <-- # of vertices of the first polygon
1 2 3 4 5 6       <-- first vertex of the polygon
.                 .
.                 .
.                 <-- last vertex (I use dot to represent the vertex line
4                 <-- # of vertices of the second polygon
9 8 7 6 5 4       <-- first vertex of the polygon
.                 .
.                 .
.                 <-- last vertex (I use dot to represent the vertex line)
0.7 0.2 0.1       <-- color of the first group of the polygons
3                 <-- # of polygons in the second group
3                 <-- # of vertices of the first polygon in the second group
1 2 3 4 5 6       <-- first vertex of the polygon
.                 <-- Now, I think you can figure it out
.
.