Answers to frequently-asked questions.
v 0 0 0
v 1 0 0
v 0 1 0
v 0 0 1
f 3 2 1
f 1 2 4
f 3 1 4
f 2 3 4
e 5 0 0
n -1 0 0
u 0 1 0
here lines beginning with v represent a vertex followed by its location in 3D, lines beginning with f represent faces with the numbers are an index to the vertices of the polygon (starting from 1), in order,
e represents the viewpoint, n the view direction and u the up vector.
In general the file is a number of vertices (one per line) written as v <x> <y> <z>, followed by a number of faces (one per line) written as
f <index1> <index2> ... <index n>, followed by a viewpoint e <x> <y> <z>, view direction n <x> <y> <z> and up vector u <x> <y> <z>.
EXTRA CREDIT: [2 marks] interactively pan the viewpoint based on mouse motion, in the plane defined by the given vewpoint and view direction.
submit -N a2q4 csc418h cartoon.c
submit -N a2q4 csc2504h cartoon.c
submit -N a2q6 csc418h robot.cpp
submit -N a2q6 csc2504h robot.cpp