CS 381, Fall 2007
HW #4
General Information
- Submit your answers to the questions, C++ source programs and screenshots
of the graphics window to Blackboard by Tuesday, October 16.
- Send source and screebshots only! No executables, project/workspace files, etc.
- Due: Tuesday, October 16 (any time).
- Worth: 20 points.
Homework Policies
See the
Homework Policies handout.
Questions (5 pts)
- Exercise 4.22
- Exercise 4.16.
- Derive the 2D transformation matrix, R(theta,P), for a counterclockwise
rotation by angle theta around the point P=(px,py). Demonstrate the tranformation
by multiplying R(45,P) by the point (2,1), where P=(1,1).
Program #1 (5 pts)
Exercise 4.15. Start with the 2D recursive sierpinski gasket program
(gasket2d.c)
from Chapter 2 of the text and replace the vertex calculation code with
instance (model) tranformations to original triangle.
Program #2 (10 pts)
Compile and run the OpenGL program cube.c from
Chapter 4 of the text.
- Modify the program by moving the update code to a timer callback function
which updates the display at a rate of 10 frames per second.
- Using (a) as the starting point, complete Exercise 4.20.
Note
Particularly well-done programs may be demonstrated in class.
CS 381, Fall 2007: Assignment 4 /
Last update: 11 Oct 2007