
Ray Tracer Challenge
by Jamis Buck · first published 2019
29mentions
21recommended by
23HN commenters
2019–2026first – last mentioned
91% recommend9% neutral
Why HN recommends it
Language-agnostic, test-driven walkthrough for building a ray tracer from scratch, starting with matrix math. It holds your hand with little graphics theory, so it suits anyone using a project to learn a new language.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.





…to learn. I also use this exercise from time-to-time to test new language features (for example C++20 ranges/coroutines recently). I also recommend this same exercise to others through the book "The Ray Tracer Challenge" [1] by Jamis Buck, because it describes an entire implementation of a raytracer in pseudocode. Beginners mostly just need to plug-in their language of choice & still end up with a satisfying visual result.…
on “Ask HN: What is the coding exercise you use to explore a new language?” ↗Another splendid resource which I've found to be in the same spirit is Jamis Buck's The Ray Tracer Challenge. It follows a language-agnostic test-driven approach to making a raytracer from scratch.
on “Computer Graphics from Scratch (2017)” ↗…natural melding of the two. Macros are a really interesting way to achieve many of the same metaprogramming properties of Ruby (although a little awkward to reason about). I used Jamis Buck's book The Ray Tracer Challenge[1] as a fun kind of way to learn the language and ended up learning a good chunk of the language as a result. My biggest complaint is just that it's not more popular - it's ecosystem is pretty web developer-centric…
on “I rewrote in Crystal my tool to quickly create Kubernetes clusters in Hetzner” ↗Jamis Buck has a new-ish book out called "The Ray Tracer Challenge" that I've been slowly working through. So far I really like the way it's written: everything is test-based, so you get a problem like: "given matrix X and vector Y, X * Y should be vector Z" and then…
on “How to Start Learning Computer Graphics Programming” ↗I've always had an interest in computer graphics, but never studied it in school. I found Jamis Buck's _The Ray Tracer Challenge_[1] and got totally hooked on creating a ray tracer. The book walks you through creating everything from scratch, starting with matrix multiplication all the way up through reflection/refraction and rendering…
on “Ask HN: What are you learning?” ↗I learned Rust while implementing a ray tracer. I followed the book _The Ray Tracer Challenge_, by Jamis Buck. It was fantastically fun, and was a great application for Rust!
on “Tour of Rust” ↗I highly recommend the two books: Ray Tracing in One Weekend: https://www.amazon.com/dp/B01B5AODD8/ The Ray Tracer Challenge: https://www.amazon.com/dp/1680502719/ For the latter, I have made it a pretty good way through the book, implementing a functional (in the programming paradigm sense) version of the ray tracer in F#.…
on “Super simple ray tracer guide after first math semester” ↗An other Ray Tracing book I've really been enjoying recently is the Ray Tracer Challenge by Jamis Buck https://pragprog.com/titles/jbtracer/the-ray-tracer-challeng...
on “Ray Tracing Gems II available as free download” ↗I can whole-heartedly recommend "The Ray Tracer Challenge" by Jamis Buck. It's a fun project-based book without all the computer graphics theory, where you focus on building a ray tracer in small increments while Jamis holds your hand until you can walk on your…
on “How to easily read 50 books a year” ↗The Ray Tracer Challenge by Jamis Buck. It uses Cucumber tests to specify the behaviour of the code, without giving you the code. Not a single weekend project. I've been doing it in C++ to learn about the modern language, but…
on “Ask HN: Best non-fiction book you read in 2024?” ↗“Mazes for Programmers” and “The Ray Tracer Challenge” by Jamis Buck.
on “Ask HN: What are some books where the reader learns by building projects?” ↗also Jamis Buck's "The Ray Tracer Challenge"
on “Ray Tracing with POV-Ray: 25 scenes in 25 days (2013)” ↗“The Ray Tracer Challenge” by Jamis Buck is really good as well
on “I canceled my book deal” ↗Can anyone recommend other books similar to this one? Having done the Nand2Tetris course and started the Ray Tracer Challenge book I find I really like these books that guide you through a pretty complex project. It helps you learn by doing while at the same time preventing you from falling into bad practices or getting overwhelmed.
on “Writing An Interpreter In Go (2016)” ↗On the topic of Ray tracing books: I'm currently at chapter 9 of The Ray Tracer Challenge and I have to say it's a wonderful book and the stellar reviews are well deserved. It handholds you all the way and that is such a breath of fresh air for someone like me, who's not a math guy, nor do…
on “Ray Tracing Essentials, Part 1: Basics of Ray Tracing” ↗