
ECS 175: Computer Graphics
Homework 1 - Spring 2004
Due in class Mon May 3
1. There are many shades of pink. Give two OpenGL color3f commands, one to make
a bright, hot, day-glo pink, and the other to make a pale, delicate rose.
2. The zvalues at any point in a 3D triangle are calculated in the rasterization hardware
using linear interpolation. For a 3D triangle with vertices (1,2,6), (5,4,1), (8,1,1),
what is the zvalue which will be found for the point with (x, y) coordinates (5,3)? In
other words, for the point (5,3, z), find z.
3. Find all two-dimensional vectors which are left fixed by the following affine transfor-
mation:
3−1 4
−2 2 6
0 0 1
4. Bezier curves can be used to control the path of an animated object. For instance, the
parabolic path of a thrown basketball can be described by a quadric Bezier curve. Say
we want 10 frames of animation. In frame zero the center of the ball is at (0,0), and
in frame 9 its center is at (6,0). To make the ball arc up inbetween, we add a third
control point at (3,6). Say we also want to put some spin on the ball, so that in each
frame it rotates around its own center by π/10.
Write the matrix for the modeling transformation you would use to place the ball
correctly in frame i. The coefficients in the matrix can be functions of i, and you do
not need to find real values for anything (eg. writing cos(π/10) is just fine).
1