CS 6620 Project 1: Basic Ray Tracer
Top
Next
Program Description
For this basic ray tracer, I has the following objects in the world object,
one sphere object: defined here and implemented here
one triangle object: defined here and implemented here
For this submit, I rendered these two objects seperately.
one Camera object, defined here and implemented here
The Camera has eye, lookat, up as its viewing control parameters.
The viewplane is defined implicitly in camera object, and its distance to eye
is automatically set to some value so that the v-coordinates in the viewplane rangs from -1 to 1.
one light object, which is now simply represented as a vector for its position.
one image object, which stores the rendered result. it is defined here and implemented here
The Image object in my raytracer actually determins the viewport and aspectio of the rendered image. It also has
a routine to change the internal pixel format and write to PPM file.
The vector class is defined here and implemented here
Here is the main function.And This is the makefile.
Here is an image of sphere rendered by this basic raytracer, with the parameters of all the objects set to their default value.
Here is an image of triangle rendered by this basic raytracer, with the parameters of all the objects set to their default value, except the light position is much closer to the triangle now (to see the shading effect).