(Yet another) walkthrough of this fantastic book by Peter Shirley. You can get a hold of it here along with other resources.
The sources are split into chapter folders, each of them with the incremental code changes specific to that chapter.
The code can be compiled with the following command under each chapter's folder:
g++ main.cpp -O2 -o main
Then, the executable can be run with:
./main > img.ppm
Note that you need g++
, or another C++ compiler installed in your machine.
The outcome of each chapter can be seen below: