Rendering bitmaps
Yesterday I started the Ray Tracing in One Weekend challenge and I’m enjoying it a lot. It cuts through a lot of the fluff without dumbing it down too much: I’m 3 chapters in and I’m already generating gradients and tracing spheres.



All the code I’ve written so far can be found in this repo. I have a gallery full of eye candy, and I’m always adding new pictures.
I also made a .bmp library in C based on the
Purdue University tutorial
and
Marc Dickmann’s library.
Mine’s a lot simpler, since I just need to save the generated Image to a file.
It was a bit of a pain getting the bitmap’s header bits right, but I learned a lot about file manipulation in C. It’ll pay off in the future, since saving the images as bitmaps is about 10% of the final project.