Computer Graphics
From triangles to light: how math becomes the pictures on your screen.
Geometry
Homogeneous Coordinatesin progress
core · ~25 minGive every point a fourth coordinate so one matrix can slide it, turn it, and show it in perspective, then divide by w and watch the far edge shrink.
Camerasin progress
core · ~25 minBuild a camera from two matrices: look-at moves the world in front of the eye, perspective squeezes it into a frame, and the near plane decides what is too close to draw.
The Pipeline
Vertex Shadersin progress
core · ~25 minRun a small program once per vertex, alone: read its attributes and the shared uniforms, move it, transform it to clip space, and hand on the varyings the next stage will blend.
Rasterizing a Trianglein progress
intro · ~20 minTurn three corners into the pixels between them: an edge function per side, a bounding box to loop over, three signs per sample, and weights that add up to one.
Fragment Shadersin progress
core · ~25 minRun a small program once per covered pixel: blend the corners' varyings by the pixel's weights, turn them into an intensity, and write it into the framebuffer.
Light & Color
Shadow Mapsin progress
core · ~25 minDraw the scene from the light, keep the nearest depth per texel, then ask every pixel whether it lies deeper than the map says. A bias against acne, and the edge a coarse map leaves behind.
Tone Mappingin review
core · ~25 minA rendered scene holds light far above white and a display stops at 1. Clamp, Reinhard, a white point, and the ACES curve each fold the range their own way, one row traced pixel by pixel.
Images
Color Spacesin review
intro · ~20 minA pixel is three stored numbers. Watch one decoded through the sRGB curve to light, weighed for luminance, read for hue and saturation, and encoded back, and see why blends must happen on light.
Tone Curvesin review
core · ~25 minOne function from an input level to an output level: black and white points, gamma, and an S for contrast, read off a histogram and applied to every pixel. What Levels and Curves do.
Color Gradingin review
core · ~30 minBalance the light, expose it, lift, gamma, and gain, pull toward or push from grey, tint shadows and highlights apart, then encode: one short pipeline every pixel runs, in that order, on linear light.
3D LUTsin review
core · ~25 minBake a grade into a lattice of colours, then answer every pixel by weighing the eight nodes around it: the table that carries a look from a grading suite into a game, a camera, or a phone.
Image Filters: Convolution Kernelsin review
core · ~25 minLay nine weights over every pixel and its neighbours and write the weighted sum: a blur, a sharpen, and an edge finder are the same loop with different numbers, and the edge rule decides the border.
Block Coding: How JPEG Throws Detail Awayin progress
core · ~30 minCut a picture into 8 by 8 blocks, turn each into cosine coefficients, divide by a table and round, zigzag the levels into runs, and see what the decoder gets back: the lossy heart of JPEG.
Animation
3D from Images
Feature Matchingin progress
core · ~25 minFind the same point in two photographs: corners where the picture changes in two directions, a descriptor per corner, distances between them, and a ratio test that refuses ambiguous matches.
Epipolar Geometryin progress
core · ~30 minTwo views of one scene are tied by a 3 by 3 matrix: a point in one image lies on a line in the other. Eight matches pin it, RANSAC survives the wrong ones, and the epipoles fall out.
Triangulationin progress
core · ~25 minA pixel is a line of sight; two cameras give two lines that nearly cross. The point nearest every ray is the answer, the angle between the rays says how well it is pinned, and reprojection scores it.
Bundle Adjustmentin progress
advanced · ~30 minMove every camera and every point at once so the points reproject onto the pixels that saw them: residuals, a Jacobian, one damped solve, and a step kept only if the error fell.
Structure from Motionin progress
advanced · ~30 minTwo views fix the frame: their essential matrix hides four poses and one puts the points in front. Each further camera is placed from points already in the world, then all is refined.
Multi-View Stereoin progress
core · ~25 minWith the cameras known, ask every pixel how far away it is: lift it to a sweep of depth planes, project into the other photo, score the patches, keep the best. A depth map, one row at a time.
Surface Reconstructionin progress
core · ~25 minDepth maps become a solid: fuse them into a grid of signed distances, put a vertex in every cell the surface crosses, and join the cells around each crossing edge into quads. Unseen parts stay open.
Alpha Compositingin progress
intro · ~20 minPainted sheets of glass, stacked: each pixel adds a sheet's brightness through the light the sheets in front let past. The over operator, front to back or back to front, is the same sum.
Volume Renderingin progress
core · ~25 minNo surface, only fog: march a ray from the eye, absorb a little at each step, add each step's glow through the light still left, and stop when none remains. The over operator, along a ray.
NeRFs: Neural Radiance Fieldsin progress
advanced · ~35 minThe scene is a function: a small network from position to density and brightness. Render it with the volume renderer, compare with the photographs, and let the error train the network.
Gaussian Splattingin progress
advanced · ~35 minA scene as a cloud of fuzzy blobs: project each to an ellipse, sort nearest first, and composite the blobs covering each pixel front to back. Rasterized, not ray marched, and trained from photographs.