Title: Basic Ray Tracer
Author: Nathan Cournia
Description: A simple ray tracer.
Institution: Clemson University
Class: CPSC805 - Advanced Computer Graphics
Language: C++
Construction Time: 30 Hours
Date Completed: Feburary 14, 2002


My first ray tracer. I implemented the following:

  • Spheres
  • Planes
  • Multiple objects
  • Shadows (Hard)
  • Reflection
  • Refraction
  • Multiple lights
  • Checkers
  • Phong shading
  • Perspective camera

    The code is completly object-oriented.


    Several problems arose during the creation of this program.

    Refraction gave me hell. I looked at several texts to try to figure out what I was doing wrong. Unfortunatly, the texts were of no help. Eventually, I just started arbitrarily changing code. After changing the index of refraction for a surface to (1 / ior) to (ior) if the incident ray emitted from outside of the shape, things seemed to work.

    I was also unable to implement soft shadows. I put a couple of hours effort into it, but only got pictures that looked horrible. Maybe next week . . .

    Compiling the code should be straight forward. Just type:

    make

    then

    ./yart outfile.ppm



    Source Code: cournia_yart-20020218pl1.tar.gz (12k)


  •