This project is based on book series Ray Tracing in One Weekend from Peter Shirley. https://github.com/petershirley/raytracinginoneweekend
You can compile this with g++
// Compiling with g++
$ g++ main.cpp
// Run the executable and send the output to a file (our photo)
$ ./a.out > photo.ppm
.ppm is an simple image file format, that is text based. I manage to open this file natively in OSX, but for Windows I had to download InfanView.
The Ray Tracing in One Weekend series of books are now available to the public for free in PDF form, along with the accompanying source code.
Alternatively, you can purchase the Kindle version of this series from Amazon.com. Half of the proceeds of these sales go to Hack the Hood, a really neat organization.