Skip to content
Ray tracer written for a graphics class I took in college in Winter 2009.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images
scenes
README
cube.cpp
lab6.h
lights.cpp
main.cpp
makefile
matrix.cpp
parser.cpp
sphere.cpp
triangle.cpp
vector.cpp

README

Ray tracer for a graphics class I took as a senior.

This is very unpolished C++ code produced by me years ago.

I'm proud of the project, not of the code quality.

To run this:
make
./lab6 scenes/some_scene_file.txt
convert -quality 100 output.ppm output.jpg
open output.jpg

Some of the features include:
  - Reflections
  - Glossiness
  - Refractions (sort of)
  - Translucency
  - Several types of lighting (point, directional, spot)
  - Depth of field view
  - Anti-aliasing
  - Textures
  - Shadows (soft and hard)
  - Concave/convex triangulated polyhedra
  - Phong smooth shading

A few images produced by this project are included in the images folder for reference.

Description of some of the included scene files:

flat.txt:
    Standard cuboid, flat shaded.

smooth.txt:
    Smoothed version of flat.txt.

checkers.txt:
    Shows a simple texture (checkers) applied to a 
    triangulated object as well as a non uniform scale and 
    rotate.

concave.txt:
    Shows a simple concave polygon.

concaveshadow.txt:
    This file is similar to concave.txt but I wanted
    to submit a clear demonstration of concave objects
    casting shadoow on themselves.
You can’t perform that action at this time.