Raytracing Demo

Recently I’ve been reading through Computer Graphics from Scratch. The sections on raytracing have been a great refresher for me, and I’ve learned some new tricks.

I’ve written up a C++ software raytracer based on the book and now I’ve got an animation to show for it! The above video combines about 2200 frames that were rendered as PPM images and stitched together using ffmpeg. Each 900x900 frame takes about 1 second to render on my M1 mac, and the renderer streams the images to an SDL2 window as they finish so that I can see the progress. Lowering the quality of the render allows us to get to real-time, but I prefer the look of the reflections.