C++ Raytracer (2005)

I wrote a raytracer in the final quarter of 2005 as part of a Computer Graphics course taught by Gabriel Gambetta, founder and lead developer of Mystery Studio. The application was developed using C++ on Debian GNU/Linux.

Instructing the compiler to optimize the code (inlining functions, running the for’s backwards, etc) reduces exection time to a mere 4.6 seconds for a 600×600 image, a very significant improvement when compared to over a minute for a Java implementation, and over two minutes on a C#/.NET implementation.


Raytracer sample run. Image was generated in 4.6 seconds on a 2GHz Celeron CPU.