I can also recommend this book when looking for something fun to implement while learning a new language. There is also the follow ups to this taking things a bit further:
> Program files will include rtweekend.h first, so all other header files (where the bulk of our code will reside) can implicitly assume that rtweekend.h has already been included.
Not a great practice. Header files shouldn't assume anything from previous inclusions of other headers.
Sure, this works as a weekend hack, but it would be nice if book (article) would promote good conventions.
This is a normal practice for applications, and allows you to pre-compile that header for performance. I don't think it's a bad enough practice to warrant complaining, but it's good for people to know the advantages or disadvantages.
Wohoo, my name is in the contributors list! This helped me get in a computer graphics grad course at a top(?) school and certainly helped in further job applications.
If anyone else is interested in a graduate degree in this field, I recommend doing something similar - I simply made a few reasonable PRs to fix some issues that I found when following along the books.
One thing that's not directly related to ray-tracing proper, so makes no sense in this book series, but is still a pretty natural (and fun!) next step (or detour) is embedding e.g. a Lua interpreter so you can use that as a scene description language separate from the rendering engine proper.
I strongly approve of this. Code snippets are nice, but with new languages⁰ it's rare to have an example of a self-contained but and complete application to get a holistic view. I think a raytracer (or its equivalent) should be a standard example.
0: Or is Rhombus a dialect? Or alternative writing system for an existing language? Or just an elaborate system of shrubs?
Andrej Karpathy's guide to Micrograd - https://www.youtube.com/watch?v=VMj-3S1tku0 - is probably the closest equivalent, in that it covers the basic ideas of backpropagation and autodiff frameworks like PyTorch, and ends with an implementation of a very basic framework (https://github.com/karpathy/micrograd) you can train small neural networks in
https://raytracing.github.io/books/RayTracingTheNextWeek.htm... https://raytracing.github.io/books/RayTracingTheRestOfYourLi...
I did this ray tracing library in Rust inspired by these books: https://github.com/DanielPettersson/solstrale-rust
And also a small UI using the lib: https://github.com/DanielPettersson/solstrale-desktop-rust
Kind of not maintained anymore.. But fun way learning Rust..