Contour field
A scalar field traced with marching squares, deformed live by the cursor. The terrain actually changes — the lines are re-extracted every frame, not warped as an image.
Contour maps are a strange and wonderful encoding: a continuous surface reduced to a set of nested closed curves, from which a reader reconstructs the shape in their head. The compression ratio is absurd and it works anyway.
How it works
The field is a sum of gaussians — four fixed hills drifting slowly, plus one centred on the cursor. Fourteen elevations are sampled across it, and each is traced with marching squares: every grid cell compares its four corners to the threshold, which gives a four-bit case telling you which edges the contour crosses, and the crossing point is interpolated along those edges so the line lands where the field actually equals the threshold rather than on the grid.
The two saddle cases are the interesting ones. When diagonal corners are above the threshold and the other two below, the cell contains two separate crossings, and choosing how to connect them is genuinely ambiguous from the cell alone.
What I was after
Line weight and opacity both rise with elevation, so the summit reads as heavier. That one decision is what makes it look like a map rather than a contour plot.
The same generator, run once at build time with no interaction, draws the hill on the front page and is the site’s only ornament.