HW2: Donut Arm
CS 481/681 2007 Homework, Dr. Lawlor
This homework is to write an OpenGL graphics application with robot-arm style "donut arm":
You should render the donut arm with at least a diffuse light
source, a ground plane, and some sort of shadows. Projected
shadows are recommended, by doing a glScalef to squash the geometry
down to (just above) the ground plane. To be able to do the
shadows, be sure to save the model matrix before moving down the arm
- The arm has three segments: the first segment is yellow, the second red, the third purple.
- At the end of the arm, and fixed to the third segment, is a
blue teapot. I drew mine with glutSolidTeapot(0.5), centered 1.5
units up from thethird segment's origin.
- The origin of the first segment is on the ground.
- Each segment should rotate about its own origin as controlled by (something in) the GUI--I recommend a GLUI_Rotation.
- Each segment contains a torus, inner radius 0.2, outer radius 0.5, center 0.5 units up from the segment origin. This makes the torus's *bottom* pass through its segment's origin.
- The origin of the next segment starts at the *top* of each torus, 1.0 units up from the previous segment's origin.
- Rotating the view does not affect the arm.
- Rotating the first (yellow) segment rotates the whole rigid arm, but does not move the ground.
- Rotating the second (red) segment does not affect the first segment, but rotates the second and subsequent segments rigidly.
- Rotating the third (purple) segment does not affect the yellow or red segments, but does rotate the teapot.
Here's a screenshot of what I wrote. I started with the 481_matrix2 example program from the course homepage.
This assignment is due at midnight on Tuesday, January 30. Please
turn in ALL source code used for this assignment, unless you used my
libraries, in which case only turn in main.cpp and your modified
shaders. Turn everything in on blackboard.