Final Project Readme - CSE 167
Student: Tasha Vanesian
This project animates a ladybug. The shell of the ladybug is formed by the top
half of an ellipsoid and the spots are texture mapped. The texture map for the
ladybug shell is applied twice, once on each side. I manually skewed the middle
spot in the bitmap so that it would appear rounded on the shell. The legs and
antennae are cylinders which wiggle as the ladybug walks. The ladybug is
allowed to walk through the wall or out of the scene. The ladybug position is
kept track of by changing the x and z coordinates using sin and cos of the
rotation. It is important to remember that OpenGL uses degrees in specifying
angle but that C and C++ use radians. Failure to use the correct form can cause
some rather interesting movements. Fog was a bit challenging, and the linear
model for fog just washes out the entire scene, even when the density is tiny.
The EXP and EXP2 models seem to work fairly well though. I didn't like the
black background turning whitish with the fog, so I let it stay black, which
looks a little funny when the ladybug moves off of the "floor" but stays fogged
when viewed against the black background.
If I had more time to work on the project, I also would have added some
other components. A transparent droplet of water which reflects the face of the
ladybug when the ladybug looks at it could be a project in of itself.
USAGE:
The files LadybugSpots3.bmp and trees.bmp must be in the local directory
in order for texture mapping to work.
Press arrow keys to control view position.
Left and right keys rotate the viewpoint left and right
Up and down keys rotate viewpoint up and down (up to 80 degrees).
Press "R" key to make step size bigger (if moving too slowly)
Press "r" key to make step size smaller (if moving too fast).
Press "w" key to toggle wireframe mode on and off
Press "M" , "m" to increase, decrease Mesh Resolution
Press "c" to toggle culling backfaces.
Press "s" to toggle the use of smooth shading and flat shading.
Press "1", "2" and "3" keys (one at a time) to toggle the three lights off and on.
Spheres are not shown for the lights.
Light 1 is red, and positioned on the left.
Light 2 is white, and positioned in the middle.
Light 3 is blue, and positioned on the right.
Press "h" to switch between
(a) positional lights and a local viewer
(b) directional lights and a non-local viewer.
Press "t" to toggle the texture on and off.
Press "j" and "k" to move the ladybug forward and backward.
Press "i" and "n" to rotate the ladybug.
Press "f" to turn fog on and off, and "F" to toggle between GL_EXP and GL_EXP2 fog modes.
Press "v" and "V" to decrease and increase the amount of fog.
Press ESCAPE to exit.