Graphics › Start here
Introduction to graphics math
A 3D model is just a list of numbers. Getting it onto your screen as coloured pixels is a chain of multiplications — and it's the same chain in every engine.
Model space: the cube as the mesh file stores it — built around its own origin, no idea where it'll end up.
the cube's far-top-right corner here: (0.5, 0.5, 0.5)
What a graphics engine actually does
A mesh — a teapot, a character, a planet — is stored as a list of vertices (points in 3D) joined into triangles. To draw it, the engine has to answer one question for every pixel on screen: what colour is it? Getting there means moving each vertex through a sequence of coordinate spaces:
- Model (local) space — the vertex as the file stores it, around the model's own origin.
- World space — the model matrix places & poses the object in the scene.
- View (camera) space — the view matrix re-expresses everything relative to the camera.
- Clip space → NDC — the projection matrix (plus a ÷w divide) squashes the visible region into the cube −1…1.
- Screen space — the viewport transform stretches that onto the window's pixels.
The one equation to remember
clip = Projection · View · Model · vertex — usually written MVP. Three matrices, multiplied once per frame, and every vertex of your scene knows where to go. (Then the GPU divides by w, scales to pixels, and fills in the triangles.)Why it's all matrices
Translate, rotate, scale, and even perspective all become 4×4 matrix multiplications once you add a 4th coordinate, w (see homogeneous coordinates). That uniformity is the whole point: the GPU does nothing but multiply 4-vectors by 4×4 matrices, millions of times a second.
Where this goes next
Start with the building blocks — vectors, transformations, the MVP matrix — then follow the coordinate spaces in order, and finish with how triangles become pixels in rasterization.