Computer Science 155: Graphics
Spring 1998
Homework 7

The early due date is Monday, March 30.
The regular due date is Tuesday, March 31.
The late due date is Wednesday, April 1.
All due dates are for midnight.
No other extensions will be granted on this homework assignment since projects begin on April 1.

The required components for this homework are cheesy reflection and fractal mountains. You may also do either or both of the extra credit components if you like.

  1. [50 points] Cheesy Reflection. Use the stencil buffer technique described in class to render a scene with a mirror and multiple additional objects. Using GLUT's pop-up menus, allow the user to vary the magnification of the mirror. Also, allow the mirror to be rotated via keyboard or mouse input.
  2. [50 points] Fractal Mountains. Use the recursive fractal mountain algorithm to render mountains. Make sure to precompute an array of random values as described in class to ensure that there are no "gaps" in the mountain (or use one of the alternative techniques proposed in class to do this). Compute normals and use lighting. Finally, use GLUT's pop-up menus to allow the user to vary some parameters of the mountain (in particular the level of recursion.)
The following are optional problems for extra credit. In particular, if you missed points on earlier homeworks, this is an opportunity to make up those points.
  1. [40 points] Shadow Volumes. Use the shadow volume algorithm in conjunction with the OpenGL stencil buffer to render a scene with the following specifications: There is only one light source. It's ambient component provides some illuminiation for the entire scene. This light source also casts a shadow of a simple object (either a tetrahedron or a cube) in a room containing a number of complex objects (such as spheres, cylinders, torii, etc.) that move in and out of the shadow.
  2. [40 points] Intersection of Cylinders. A famous "thought experiment" is to try to visualize the intersection of two orthogonal cylinders of the same size. Use the CSG technique from lecture to render the intersection of two such cylinders. The user should be able to rotate this object using the keyboard or mouse.