CSC 305 - 2007 Assignment 3: Basic ray tracer.

Due date: midnight Monday 3rd December 2007.

Weight 15%

 

Implement a basic ray tracer. The ray tracer should include:

  1. sphere objects.
  2. a recursive ray tracer (reflection)
  3. shadow rays
  4. directional light sources
  5. reflection; although this can terminate after 1 reflection.
  6. User specified camera position and view direction. (from/to)

There are several ways of writing the output to an image file, e.g.

1. Use Qt - many built in standard formats.

2. Output to a .ppm file . The ppm file format looks like this:

P6 width height 255 newline image data

The data is 3 unsigned bytes pre pixel (RGB) organised left to right, top to bottom. The code for this is availbale from: http://www/csc.uvic.ca/~csc405/src/ppm.tar.gz

There are many utilities under Linux for dealing with ppm files.

An input file to specify the objects in the scene, for example: sphere centre, sphere radius, RGB, reflectivity, eye position, light source position, resolution.

Documentation is required. In this document you will be expected to explain your design choices, as well as describe the algorithms and data structures you have used.

Bonus marks to a maximum of 2 will be awarded for the following:

  1. multiple light sources
  2. spot or point lights
  3. super sampling
  4. ray triangle intersections
  5. refraction

 

 

Good luck!