CS 476 Computer Graphics, Homework #6
Due: Monday November 17, 5pm, no extensions.
- Learn to load textures from image files in one of the major
file formats (you may load PNG, JPG, BMP or GIF).
- Obtain or create appropriate texture maps for your car, these
textures might be images taken from photos of a real car, but
do not have to be.
- Obtain or create an appropriate texture map for the inside of
your track. Recommended would be something like a grass texture.
- Map the textures onto the surfaces of your car and track.
Calculate texture coordinates between 0.0 and 1.0 to map car
texture onto specific sections of the car. Enable texture wrapping
and calculate texture coordinates > 1.0 to repeat the grass
texture as needed within your track. Note: if you don't draw a
filled polygon in the middle of your track, you can meet the
requirement with some other object that employs repeated/wrapping
of a texture.
- Draw some interesting 3D object in the middle (pyramid of giza, statue
of liberty, death star...), and texture it.
- Implement some user interface that accelerates and decelerates the
race car. For example, pressing (f) for "faster" speeds it up, and
pressing (s) for "slower" slows it down.
- Draw a "competitor", a computer-controlled car that races you.
Its speed should be proportional to the degree of curvature,
fast on straightaways, and slow on curves.