*VVV* is tool that allows you to see the effects of changing
viewing and projection parameters on seeing a scene.

Besides the usual OpenGL libraries GL, GLU and GLUT you need GLUI, a cross-platform programming interface for creating a user control interface to an OpenGL application. GLUI was written by Paul Rademacher and is now distributed at SourceForge.

Snapshots of the control and graphical output windows

The definition of the viewing volume is controlled by the left column
of the control panel (Camera 1). The first principal
distinction is made between *Orthographic Projection*
and *Perspective Projection*. If Perspective Projection is
chosen (Orthografic checkbox not selected) two possible
specifications for Perspective Projection can be given:
"Perspective" and "Frustum".
If "Perspective" is chosen then the system call
**gluPerspective( fovy, aspect, near, far )**
to OpenGL is used to specify the parameters of the Perspective Projection.
If "Frustum" is chosen then the system call
**glFrustum( left, right, bottom, top, near, far )**
to OpenGL is used to specify the parameters of the Perspective Projection.
From these two alternative system calls the *Projection Matrix*
in OpenGL is calculated.

The viewing parameters of the scene, i.e. the relationship between eye coordinates and
object coordinates are defined by the parameters of the system call of the GLU utility library
**gluLookAt( eyex, eyey, eyez, centerx, centery, centerz, upx, upy, upz )**,
where *eye** is the position of the camera (in object coordinates),
*center** is the focal point to which the camera is looking (in object coordinates) and
the *up** vector defines the direction which is considered
"pointing upwards". From **gluLookAt()** the *Modelview Matrix* in
OpenGL is calculated. Since the Modelview Matrix transforms from object coordinates
to eye coordinates an equivalent effect to 'gluLookAt' could have been achieved by
two rotations and one translation.

Exactly as for the principal view, the viewing and projection parameters can be specified for camera 2 (middle column of control panel).

**Additional Features:**

- Several different object types (provided in the GLUT (or Free_GLUT) library)
- Switching between wireframe and solid for the object and the viewing volume
- Continuously rotating the object
- Some animation: Rotation of the camera in X-Z and X-Y plane
- The button "Matrix Exhibition" dumps the values of the modelview matrix, the projection matrix and the viewport (upper part of the window) of the principal view to the console
- The button "Code Generation" dumps a C file which specifies viewing and projection of the current principal view in one routine. It could be incorporated into another program that wants to define a specific view and projection. VVV can therefore be used as a preview tool.
- "Reset" puts the program in its initial state.
- "Quit" exits the program.