COMP1011 Assignment 2 - 05s2
Computing 1A 05s2 Last updated Fri 21 Oct 2005 17:14

A Simple Ray Tracer

Version 1.3


13 Oct Initial version for 05s2
16 Oct Added RayTrace binaries for Windows
21 Oct Second example for writePpm


Ray tracing is a popular method for generating realistic images replete with shadows and reflections, and is used in a wide range of graphical applications. In fact the very same techniques you will become familiar with in this assignment are used in the creation of modern animated movies such as Final Fantasy, Toy Story and Shrek.

In this assignment you will complete a partial implementation of a simple ray tracer by solving the following tasks:


This assignment specification is rather lengthy. It will probably take some time just to read and understand the specification. We strongly recommend that you refrain from beginning to program too early. In fact, this assignment mirrors real software engineering closely; it is often the case that understanding the problem (and code that has already been written) takes almost as long, if not longer, than the actual process of programming.

This assignment includes a bonus part, which comes with a whole lot of more information and additional functions to implement. However, you can completely understand and solve the basic part of this assignment without ever looking at the bonus specification. In fact, even if you intend to solve the bonus part, we strongly recommend to read, understand, and solve the basic part of the assignment first. Only after you have solved the basic part should you start on the bonus part. All pieces of the specification that are part of the bonus are marked by the label "bonus ONLY".

We should stress that you will only have to implement a relatively small portion of the functionality. We specify exactly what you must implement in section The Task. Whatever remains has already been implemented for you.

Pretty Pictures

If you create interesting scenes of your own (by writing new .scn files) please post them on the forum!