Assignment 4 - Ray Tracing: The Z-Buffer
CS5600 - Introduction to Computer Graphics
Due Wednesday, 5 April 2006, 23:59 hours
Overview
This project requires you to implement a basic ray tracer that will be built
upon in the next assignment. The ray tracer should preform ray-object
intersections and display the objects correctly via a z-buffer that you must
construct. You should not use any openGL command to draw to the screen.
Project Requirements:
The following are requirements for the project:
- Create a Scene. The scene to be ray traced should contain
at least 2 triangles and 2 spheres. The spheres should be described by
parametric equations. The scene should be setup such that all objects in the
scene overlap at least one other object, demonstrating the robustness of your
z-buffer. Assign each object a different, flat color value.
- Implement a Ray Tracer. Using the template code from
assignment 1 (see below) construct a ray tracer which determines the color of
every pixel in the rgb_pixel data structure (named canvas).
- Object Intersections. Implement ray-triangle and ray-sphere
intersections.
- Save and Submit Images. You must submit at least one image
generated by your ray-tracer demonstrating the use of the z-buffer. You may
use screenshots (i.e. from gimp or alt-printscreen) to capture images if the
save function from the template file does not produce satisfactory
results.
- Documentation: Briefly explain what your program does and
how to operate it. In addition, describe all data structures, major functions,
and the program's flow of control. Also document any known bugs and any areas
of the assignment you had problems with.
Turn in all your code and documentation using submit into the
directory called assign4Linux for Linux assignments or
assign4Windows for windows assignments (i.e. submit cs5600
assign4OS file1 file2...). Your code should be written in
C/C++, however you may choose to develop on Windows or Linux. Be sure to hand
in your MSVC project or your Makefile and that there are no problems running
your code.
Resources
You should use the Makefile and template file from the first assignment. As
mentioned above, your ray tracer should fill in the pixel colors in the
rgb_pixel pixel buffer data structure. You do not need to provide a user
interface for this assignment and are welcome to remove this code from the
template.
Here a link to
the MSVC 2005 project.