Following along with the Ray Tracing in One Weekend book.
The book gives step by step instructions to write a ray tracer in C++. In this repo I follow the steps but I am using C instead of C++. The output of the program is a PPM image file.
make
./main > image.ppm
For more information about this repository, see the blog post where I talk about what I did here.
In some of the branches of this repository I experimented with various speed optimizations. This is not the point of the Ray Tracing book but I thought it was fun. Also see these posts (1, 2 and 3) by fellow Recurse participant Jake who was exploring this stuff at the same time as me and who did a great job writing about it.