Skip to content
Simple C++ Ray-Tracer
Branch: master
Clone or download
Latest commit 0f7acf5 Jan 23, 2016
Type Name Latest commit message Commit time
Failed to load latest commit information.
.settings Update email address. Jan 23, 2016
src Update email address. Jan 23, 2016
.cproject Update cdt project information. Jan 23, 2016
.project Import Raytracer code Jan 23, 2016
LICENSE Initial commit Jan 23, 2016 Update Jan 23, 2016

This is a simple C++ Ray-Tracer that I wrote in 2005.

The project has its home at

On a Posix system you should be able to compile the program using

g++ -O3 -march=native src/*.cpp -o raytracer

Once compiled you find a binary 'raytracer'. You start the ray tracer with ./raytracer. Note that there is currently no parser! Thus, to create your own scenes you will have to program them in C++ (see examples.cpp).

The compiled program provides the example scenes 0 through 11. You can specify the scene number using '-n NUMBER' option. Further, you can specify the image with and height using '-h HEIGHT' and '-w WIDTH'.


./raytracer -n 3 -w 400 -h 300

will render scene number 3 in 400x300.

The output file will be writen to out.ppm. To view the rendered scene open this file with our favourite graphic program.

Send comments to the program and source code, possible bugs or any questions to

You are welcome to contribute to the project.

Have fun!

Micha Riser

You can’t perform that action at this time.