NOFF format

  1. Header

    starts by "NOFF"
  2. Meta Infomation

    three numbers, number of vertices, number of faces, number of edges
  3. Vertex List

    One vertex is represented by x y z nx ny nz in one line. (x,y,z) are coordinates of the vertex, (nx,ny,nz) are the coordinates of the normal associated with this vertex. The vertex are ordered.
  4. Face List

    One face is represented in one line, in the following format:

    number of edges of this face and the indecies of each vertex on this face. The index is decided in the vertex list, starts from 0.


OFF format

  1. Header

    starts by "OFF"
  2. Meta Infomation

    three numbers, number of vertices, number of faces, number of edges
  3. Vertex List

    One vertex is represented by x y z in one line. (x,y,z) are coordinates of the vertex. The vertex are ordered.
  4. Face List

    One face is represented in one line, in the following format:

    number of edges of this face and the indecies of each vertex on this face. The index is decided in the vertex list, starts from 0.


Example

The following is an off file representing a cube.
 OFF                                    //header
 8 12 12                                //metainfo
 1.0  1.0  1.0                          //vertex list
 1.0  1.0 -1.0 
 1.0 -1.0  1.0 
 1.0 -1.0 -1.0 
-1.0  1.0  1.0 
-1.0  1.0 -1.0 
-1.0 -1.0  1.0 
-1.0 -1.0 -1.0 
3 0 2 3                               //facelist, each face is a triangle
3 3 1 0    
3 4 5 7 
3 7 6 4
3 0 4 6
3 6 2 0    
3 1 3 7
3 7 5 1
3 0 1 5
3 5 4 0    
3 2 6 7
3 7 3 2