Due date: Saturday, December 11, 2010 @ 11:59 pm
Total Marks: 100 marks + 30 bonus
Write a recursive ray tracer. For ray tracing, you need to create an image of a scene including several objects and models. You may specify the scene in the code and output the resulting image to a file or to the screen. The type of image file you use is your choice but the user must be able to specify the desired width and height of the resulting image through the command line or an input file.
Objects in the scene: Spheres (15 Marks), Triangles and quads (20 Marks)
Phong lighting model and point light sources with dynamic positions (20 Marks)
Shadows (15 Marks)
Reflection (recursive) (20 Marks)
To receive the marks of 1, you need to implement at least one of the 2, 3 and 4 features..
Bonus (maximum 30 marks)
· Read scene and light specification from an input file (5 Marks)
· Dynamic eye position and viewing direction specification (5 Marks)
· Refraction (recursive) (10 Marks)
· Simple anti-aliasing as discussed in class (5 Marks)
· Using your surfaces from assignment 2 in the scene (5 Marks for surface of revolution, 5 Marks for B-spline surfaces)
· Using triangle mesh in MD2 format in the scene (5 marks)
· Animated MD2 (a sequence of images generated by ray-tracing) (5 marks)
· Add other primitives such as cones, or implicit surfaces (5 marks each, up to 15 marks)
· OpenGL interface to create and preview the scene for ray-tracing. This interface should include controls to position, orient, and scale objects within the scene (10 marks)
Due to speed issues for ray-tracing, along with your code and documentation you must submit at least three images produced by your ray-tracer. Your submitted images must show that each of the features (and bonuses) that you implemented work properly. You will not receive marks for features that are not demonstrated in the images you submit. You must also include a README file that describes the images you submit and which features are demonstrated in each image. It is up to you to decide on an output file format. You may use QT’s QImage to write the image to disc and display it, or you may display it in OpenGL and capture the screen to be saved on disk. Another alternative is that you may use an existing library for bitmap format such as .png, .bmp, .pcx or .ppm to save the output. For example, PPM is a very simple format and its specification along with a library to read and write PPM files can be found here.
You must provide a README: