Distance, with a sign
Pick any point in the plane. A signed distance field answers one question about it: how far to the nearest surface, and are you inside or out? Positive outside, zero exactly on the boundary, negative within. The rings here are lines of equal distance — the shape itself is just the ring where distance hits zero.
Drag the circle, and drag the probe to read its distance.
Carving with min and max
Two fields combine with almost nothing. Take the minimum of two distances and you get their union — whichever surface is nearer wins. The maximum gives the intersection, the sliver they share. And keeping max(a, −b) subtracts the second from the first, biting a piece out. Booleans, for the price of two comparisons.
Move the shapes; switch the operation.
The smooth minimum
Here's the trick that makes SDFs feel alive. Replace the sharp min with a smooth minimum — one that rounds the seam where two shapes meet — and they fuse like droplets of mercury, necking together with a fillet you never had to model. One parameter k sets how wide the blend reaches.
Slide the blend and drag the shapes together.
Offsetting comes free
Because the field is distance, growing or shrinking a shape is just arithmetic: subtract a number and every point moves that far outward, add one and it erodes inward. Take the absolute value and subtract, and you hollow the shape into a shell of constant thickness — the offset that would be fiddly with edges is one line here.
Offset the shape in and out, or hollow it to a shell.
The field studio
Everything at once: drop circles and boxes into the field, drag them around, and let the smooth minimum weld them into one flowing body. Switch to subtract and the same shapes become chisels, carving voids. The distance rings redraw live so you can read the whole field — and the crisp zero ring is the object you've sculpted, blended and boolean'd out of pure distance.