CSCI 480/580 Lecture 8 - In-Class Problems

  1. Given a viewing ray (p + td) and the t at which it intersects a surface, find a unit vector giving the direction from the surface towards the viewer.

  2. Given a ray (p + td) and the t at which it intersects a surface, calculate a unit vector giving the direction from the surface towards:

    • point light source at position
    • a directional light source with direction
  1. A scene contains a unit sphere centered at the origin. A directional light shines on the scene, coming from direction .

    • Give the coordinates of the brightest point on the sphere.
    • Describe the set of points on the sphere where the amount of light hitting the sphere goes from nonzero to zero.
  1. Making use of pseudocode that we've already written, describe how to implement mirror reflection in our ray tracer. In other words, suppose we are implementing a traceray function that takes a ray, the scene, and returns the color seen along that ray. When implementing traceray, what do we do in the case where the object the ray hits is a mirror?