**Math 155A - Geometric Computer Graphics
Ray Tracing Programming Project**

**Programming assignment #3B.** This is the third programming
assignment for Math 155B. You are asked to add some features to the ray
tracing code as written so far. **Due date: March 1.**

Choose one of the topics listed below, or subject to approval, you may suggest another project. It is OK if more than one person chooses the same project. You must discuss the plan for and design of your project with Professor Buss at least one week before the due date.

**Looking ahead:** Your fourth programming assignment will be to
design a **small** virtual world that shows off the capabilities of
ray-tracing and render an attractive scene (or better: a beautiful, or otherwise striking,
scene). We will use PrintScreen to generate JPEG output which can be saved.
You should keep this in mind, as you may already start working on the fourth project
during the process of completing programming assignment #3.

**Suggested projects:** (It is recommended that you choose one of 1-5, 7.)

Items 1-7 involve distributed ray tracing and backwards ray tracing.

- Implement the use of multiply view rays per pixels, so improve aliasing. You should be able to point to improvements (like fewer "jaggies" on lines). You may also draw a scene with aliasing problems (say with a large reactangle with a small checkboard pattern), and notice how it is improved.
- Use multiple view rays per pixel to implement depth of field. This will allow objects at the "focus distance" to be in focus and objects which are closer or further away to be out of focus.
- Implement distributed ray tracing for reflections. You should be able to demonstrate blurry fuzzy reflections. Extend this to include distributed ray tracing for transmission (refraction).
- Implement distributed ray tracing for shadow feelers. Your rendered scene should exhibit soft shadows and penumbras.
- Implement the high-level ray tracing code to intelligently track the attenuation of light through multiple bounces, and prunes the ray tracing tree accordingly.
- Use distributed ray tracing to show motion blur.
- Implement some backwards ray tracing.

Items 8-19 are geometric.

- Implement a ViewableCylinder class, which supports efficient intersection of cylinders and rays.
- Implement a ViewableEllipsoid class, which supports efficient intersection of solid ellipsoids and rays.
- Implement a ViewableTorus class, which supports efficient intersection of a torus and a ray. (See also item 15.)
- Implement a ViewableParaboloid class, which supports efficient intersection of a ray and a paraboloid.
- Implement a ViewableConvexPolygon class, which supports efficient intersection of convex polygons and rays.
- Implement a ViewablePyramid class, which supports efficient intersection of pyramids and ray. You may define pyramids as having either triangular or rectangular bases. (See also item 13.)
- Implement a ViewableParallelopiped class, which supports efficient intersection of parallelopipeds and rays. This includes cubes and rectangular prisms.
- Implement a ViewableConvexPolytope class, which supports efficient intersection of convex polytopes and rays.
- Implement a ViewableBezier2Rotation class, which supports efficient intersection of a ray against a degree 2 Bezier curve rotated around an axis.
- Implement a ViewableBezier2Extrude class, which supports efficient intersection of a ray against an extruded degree two Bezier curve.
- Implement a ViewableBezierTube, which supports efficient intersection of a ray and a tube with circular crossection which follows a Bezier path (degree 3 preferred).
- Implement a ViewableBezier class, which supports efficient intersection of Bezier patches and rays. It is recommended that you place restrictions on the Bezier patchs.. Suggested restrictions would be to restrict to degree two or three, or to require the Bezier patch to specify a height field only.

Items 20-23 are miscellaneous.

- Write code to convert Ben's capture of polygonal 3D Studio Max data into function calls to the ray tracing routines.
- Learn about the Cook-Torrance lighting model and write new versions of the
**Material**class and the**DirectIllumination()**routines which implement Cook-Torrance lighting in place of Phong lighting. You will probably want to combine this with distributed ray-tracing since reflection and refraction angles will become wavelength dependent. - Implement new
**TextureMap**classes that apply texture maps loaded from files. - Improve the user interface by allowing trace depth and viewpoint to be set by user control, and by rendering in real-time using the base OpenGL routines for trace depth zero (instead of ray-tracing).