# Gabriel Gambetta demystifies computer graphics: raytracing and rasterization from scratch

Original title: Computer Graphics from Scratch (2021)

> Hacker News story 50537832 · language: en · submitted 2026-11-17
> Web version: https://zeli.app/story/50537832
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 90 · by [ibobev](<https://news.ycombinator.com/user?id=ibobev>) · 💬 17
[original](<https://www.gabrielgambetta.com/computer-graphics-from-scratch/index.html>) · [HN discussion](<https://news.ycombinator.com/item?id=50537832>)

## Summary

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.

## Key quote

> Behind the beautiful imagery of the latest animated movie and the realistic environments of popular videogames lie some mysterious algorithms.

## HN discussion (17 comments)

### [kbruner](<https://news.ycombinator.com/item?id=50542103>)

> 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](<https://news.ycombinator.com/item?id=50541247>)

> \- 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](<https://news.ycombinator.com/item?id=50538028>)

> This is a great tutorial. I also bought the book published by No Starch Press.

---

## Cite

- Page: https://zeli.app/story/50537832
- Date: 2026-11-17
- Source: gabrielgambetta.com (https://www.gabrielgambetta.com/computer-graphics-from-scratch/index.html)
- Hacker News: https://news.ycombinator.com/item?id=50537832

## Other languages

- zh: https://zeli.app/zh/story/50537832 · markdown: https://zeli.app/zh/story/50537832.md
- ja: https://zeli.app/ja/story/50537832 · markdown: https://zeli.app/ja/story/50537832.md
- ko: https://zeli.app/ko/story/50537832 · markdown: https://zeli.app/ko/story/50537832.md
- de: https://zeli.app/de/story/50537832 · markdown: https://zeli.app/de/story/50537832.md
- es: https://zeli.app/es/story/50537832 · markdown: https://zeli.app/es/story/50537832.md
- ru: https://zeli.app/ru/story/50537832 · markdown: https://zeli.app/ru/story/50537832.md
