Obj Mesh File Format

Obj mesh file format is very commonly used, and is quite simple. Each line starting with a character indicating what type of information it is.

        v    x1, y1, z1

This is the vertex command, it specifies a vertex by its three coordinates. The vertex is implicitly named by the order it is found in the file. 

For example, the first vertex in the file is referenced as '1', the second as '2' and so on.

        f    v1, v2, v3

This is the face command, it specifies a triangle face by the index of its three vertices.

Besides character 'v' and 'f', there are other lines that are starting with other characters, however, for this assignment, we can safely ignore all others.