CIS681 Lab 3

Winter 2K11
due Monday, February 7 Wednesday, February 9

FINALIZED

directional light,tilt=0 directional light, tilt=30 point light spot light
snell = 0.95 snell = 1.05
1 Reflective 2 Reflective 2 Reflective; 1 Refractive

Objective

To modify lab2 to:
  1. incorporate recursive ray tracing with shadows,
  2. extend the types of light sources that are handled
  3. process the head tilt parameter

Assignment

  1. Use the scene file specification found in the Lab #2 specification with the addition lightsource commands found below.
  2. Modify your ray tracer to incorporate refraction, reflection, and shadows. Use at least 5 levels of recursion.
  3. Add the ability to handle the other types of light sources:
  4. Include the processing of the head tilt parameters. A positive head tilt angle should rotate the head clockwise and, therefore, rotate the image counter-clockwise. Compute the camera coordinate system, <u,v,w>, as in Lab #2, then redefine u and v using the sine and cosine of the tilt parameter times the u, v vectors.
  • Read in a scene description file just like Lab #2. The next 3 parameters of the sphere command are the parametes for reflectivity and transparency including the Snell coefficient: ks, kt, and n1
  • Call your program lab3. As before, your program should take one argument, the name of the scene description file. The grader should be able to do the following (if the output file specified in output.ppm) on a departmental machine under UNIX:
    make
    lab3 input.txt
    convert output.ppm output.jpg
    display output.jpg
    
  • Include with your submission sample input.txt files that demonstrate to the grader effective use of: You can use as few as two input files or as many as you'd like. It is your responsibility to create input files that demonstrate to the grader that your lab satisfies the lab requirements.

    Notes


    Extra Credit


    Last updated 2/1/11

    class home page