ggambetta
Joined 13 years ago
Joined 13 years ago
What this lets you do is composing multiple transforms into one matrix multiplication instead of a sequence of multiplications and additions; that's what dramatically increases performance, on modern computing devices but most especially on ancient ones, where we were fighting for every MUL.
More details: https://gabrielgambetta.com/computer-graphics-from-scratch/1...
Interestingly,
He's a doctor [in general] -> el es médico
He's the ship's doctor [this specific ship] -> el es el médico del barco
He's a ship doctor [generally works in ships] -> el es médico de barco
I would not recommend anyone to write a production rasterizer using the algorithms in my book. This website seems more performance-focused (Bresenham is the obvious choice to draw lines, for example).
Specifically about clipping, you can ignore all the planes except the near plane, and everything will be fine. You'll try to draw more pixels outside the canvas but that's just slow, not problematic. The near plane does protect you from divisions by zero and from points with negative Z, which project upside down and mess things up.
Actor / filmmaker: http://gabrielgambetta.biz