CS 426 Exercises
  Direct Illumination

  1. Give examples from the real world of light sources best approximated by OpenGL point light sources, by directional light sources, and by spot light sources.
  2. Write an equation describing the attenuation with distance (r) of light intensity eminating from a point light source in the real world.  How is it modeled in OpenGL?  Why are they different?
  3. Give examples from the real world of surface materials that are primarily diffuse and/or primarily specular.
  4. Derive the equation for diffuse reflectance (Iout = cos(theta) * Iin).
  5. Write the equation for the Phong model of surface reflectance including ambient, emissive, diffuse, specular, transmission, and shadow terms.  What is the ambient term?  Why is it included in the model?
  6. Derive the equation for determining the direction of refraction rays given an incoming ray and indices of refraction.
  7. Describe Gouraud shading.  What extra information must be included in a 3D model for Gouraud shading?  What types of objects and lighting effects can be modeled well with Gouraud shading, but not with flat shading?
  8. If you produce image A by drawing a triangle with Gouraud shading, and then produce image B by drawing the same triangle rotated by 90 degrees, will A and Rotate(B, -90) be the same?  If not, why not?
  9. Describe Phong shading.  What types of objects and lighting effects can be modeled well with Phong shading, but not with Gouraud shading?
  10. Why is Phong shading more efficient than ray casting?  What types of objects and lighting effects can be modeled well with ray casting, but not with Phong shading?