CS 381, Fall 2007
HW #6

General Information

Homework Policies

See the Homework Policies handout.

Questions (10 pts)

  1. (3 pts) What are the three main ways in which a ray of light interacts with the surface of an object? Which of these was covered most in Chapter 6 of the text?
  2. (3 pts) The Phong Model splits light into three types. Name and briefly explain each one.
  3. (4 pts) Consider the plane defined by the points (0,-1,1), (1,1,-1) and (-1,1,-1).
    1. Derive the equation of the plane.
    2. What is the normal vector for the plane?
    3. Derive the reflection vector from the point (0,0,0) for a light source located at (0,5,0).

Program #1 (5 pts)

Compile and run the sphere.c program from Chapter 6 of the text. Adjust the parameters of the sphere and lights to reproduce the spheres shown in Figures 6.34, 6.37, and 6.38 as closely as possible. Pay particular attention to the mesh subdivision, location of lights and surface properties of the spheres. Describe the changes that were required to match the figures and include a screenshot of the output.

Extra Credit:

  1. Select properties for the light source and sphere that most closely model a "disco" ball, a sphere with mirror facets illuminated by a spotlight. Explain the properties you chose and include a screenshot of the output.
  2. Add rotation of the "disco" ball around the y-axis at a rate of 20 rpm.
  3. What aspects of the disco ball program most closely model a real disco ball?
  4. In what ways does the disco ball program fail to model a real disco ball? Hint: Real disco balls are usually operated in a darkened room.

Program #2 (5 pts)

The Utah teapot (also known as a "teapotahedron") is shown in Plate 25 of the text using a variety of material properties for the surface of the teapot. Starting with the program teapot.c, adjust the light and material properties and OpenGL shading attributes to reproduce the brass teapot (2nd from left in top row) as closely as possible. Pay particular attention to matching colors, highlights, and shading of the teapot. Describe the changes you made to the original teapot program and turn in the resulting image. Hint: Plate 25 was created using a single white light source.

Note

Particularly well-done programs may be demonstrated in class.


CS 381, Fall 2007: Assignment 6 / Last update: 03 Nov 2007