|
EXERCISES FOR Week 6
|
| week6-1 |
Copy the file /classes/cs3014/files/Transformations/ortho_demo.cpp
to your directory. In the init function, comment out the three lines of
code that sets the viewer. This results in the default viewing
position. What are the default values for gluLookAt?
Compile and run the program. Explain what you see. |
| week6-2 |
Again working with ortho_demo.cpp, make changes to the parameters in gluLookAt and rerun the program each time. Make sure you can explain what you see.
|
| week6-3 |
Copy the file demo_ortho_3D_transform.cpp to your directory. Look at the documentation to see what each key does. Run the program, trying out the various features. Now go back and look carefully at the code that produced each result.
Make sure you understand what each triple of numbers does and why they were chosen.
|
| week6-4 |
Still working with demo_ortho_3D_transform, look at the various rotations. Make sure you understand how rotating with respect to an axis works.
|
| week6-5 |
Add code to demo_ortho_3D_transform so that the three axes are drawn as part of the display. Choose three different colors for the axes and display only the positive portion of each axis. The length does not matter, as long as they are the same length and they extend beyond the teapot.
|
| week6-6 |
Add code to demo_ortho_3D_transform so that the 'x' key toggles the axes on and off. |