Ray Tracing in C++
Explore the directory of projects here.
Compiling and Running
The main file (ray-tracer.cpp) must be compiled using C++11, since it uses threading. There is a run script developed for Mac to assist with compiling.
When run, the program will create binary PPM image files in the images/ folder, which can then be converted to other image formats.
The provided script takes an integer parameter to compile, run, and convert images for the user.
./run 0 # cleanup ./run 1 # compile ./run 2 # compile & package ./run 3 # compile & run ./run 4 # compile & run & convert ./run 5 # compile & run & convert & open ./run 6 # compile & run & convert & open & cleanup
This project is being provided as-is, and I know there are bugs in the ray-tracer. For example, Monte Carlo global illumination broke when I added in photon mapping. Occasionally, some scenes provide errors at particular pixels, which causes an entire thread to fail. I just hope the ideas buried in these files may be of use to others.