Gabriel Gambetta demystifies computer graphics: raytracing and rasterization from scratch
Computer Graphics from Scratch (2021)

Gabriel Gambetta's Computer Graphics from Scratch explains the algorithms behind animated movies and video games, focusing on raytracing and rasterization. It builds each algorithm without external libraries or APIs, using language-agnostic pseudocode, so anyone with basic programming and high school math can follow. Interactive demos bring the concepts to life.
Behind the beautiful imagery of the latest animated movie and the realistic environments of popular videogames lie some mysterious algorithms.
- kbruner
I don't see clipping in homogeneous space, which seems like a big omission. Can't beat good old Foley/van Dam - "Computer Graphics Principals & Practice" for stuff like this.
- vivzkestrel
- a few major questions from a guy who is absolutely not familiar with this subject
- is x axies increasing towards right, y axis towards top, z axis into the screen
?
- are there other alignments for x,y,z?
- does every object have coordinates defined in the -1 to 1 range?
- what is local coordinate system compared to world coordinate system and does it also stick to -1 to 1 range? let us say I have a 3d Cube 5 units think, what does the local coordinate system for this look like and if I wanted to place it at 0,0,0 what do we do? multply local x world space in matrix form?
- AlexeyBrin
This is a great tutorial. I also bought the book published by No Starch Press.