Skip to content
PatternWall

Contours

A landscape nobody surveyed, read from above.

noiseorganic

Clock, date, widget row and the two bottom controls, drawn where iOS draws them.

Contours rendered with the Obsidian palette, seed contours-001

Previewing with 8% bleed, as exported. Seed contours-001.

Safe zones
Contours

Which pattern you are looking at. Tap the preview to move to the next one and round again; the seed and the palette come with you, so the same words draw the same idea four ways.

2.0

How far back you are standing. Low values give two or three broad massifs across the width; high values an archipelago of small islands.

2

Octaves of noise. One gives smooth domes; each one after roughens the coastline without moving the mountains.

How Contours works

A contour map is a landscape answering one question over and over: where exactly is this height? Join up every point at 200 metres and you get a line; do it at 220 and you get another inside it; keep going and the shape of a hill appears without anything ever drawing a hill. Nothing here is a picture of terrain. There is a height at every point on the canvas, and everything you see is the set of places where that height crosses a round number.

The heights come from fractal noise — several octaves of a smooth random field, each one half the amplitude and twice the frequency of the last. Terrain scale sets how far you are standing back: low values give two or three broad massifs across the width, high values a crowded archipelago. Detail is the octave count, and it changes the character rather than the size: at one octave the land is all smooth domes, and each octave after that roughens the coastline without moving the mountains. The two are worth separating because "bigger hills" and "rougher hills" are different requests and a single knob answering both would satisfy neither.

Left there, the result is a landscape without drainage. Fractal noise is isotropic — nothing in it prefers a direction — so the landforms come out as rounded blobs, where real country is organised by the water running off it: ridges that carry for miles, valleys that branch. This map does not attempt that, and the reason is worth stating rather than hiding. Both of the obvious fixes work on the field, at the scale of the hills — dragging the sample point through a second noise field, or creasing the heights with ridged noise — and both change which hills you get rather than how the map reads.

The texture that does survive is at the other end of the scale entirely. Roughness displaces the traced line itself, after the landforms are settled, so every hill stays exactly where it was and each contour picks up the fine crenulation a surveyed line has. It takes no room it does not have: the displacement is capped by the gap to the next line, so a steep face stays legible and open country gets the most of it. At zero the lines are as smooth as the grid can draw them, which is the plainest version of this map.

The lines are found by marching squares. The field is sampled onto a grid, and every cell of that grid is compared against each height that passes through it: a cell with two corners above the line and two below has the line crossing two of its edges, and where it crosses is worked out by interpolating between the corner heights. That gives a heap of disconnected two-point fragments, which are then chained back into the curves they belong to — each crossing sits on one grid edge, and an edge is shared by exactly two cells, so the fragments join without any guessing about which end meets which — and drawn as a smooth curve through the crossings rather than as a run of straight hops between them.

Chaining is what makes resolution a fair control rather than a tax. Drawn fragment by fragment, the only route to a smooth curve is a finer grid, and the grid is the one thing a render actually costs. Interpolated, a coarse grid gives a curve just as smooth; what it costs instead is memory of small things, so islands vanish and narrow inlets round off before anything ever looks angular. The default sits where the small islands survive.

Two cases are genuinely ambiguous: a cell with high corners diagonally opposite each other is either a saddle or a pinch, and the crossings alone cannot say which. Taking the average of the four corners settles it, and the difference is visible — guess wrong and contours join across a pass that should divide them, which is the difference between two hills and one lumpy one.

Elevation tint is the layer wash a printed atlas puts under its contours — lowland one shade, high ground another — and it answers a question the lines cannot. Contour spacing tells you how steep somewhere is, but reading height off it means counting rings inward from a number you have to find first; a wash tells you at a glance. Its interval is deliberately much coarser than the contour interval, and derived rather than set: about six steps whatever the line count, always a whole number of contour intervals, so every boundary in the wash is a line the map already draws. That is not only cartographic tidiness — tinting a band per contour turns out to be unaffordable, because at ordinary settings the height changes by about one band across a single grid cell, so there is no flat interior anywhere to fill cheaply.

The interval a contour map can carry is not a free choice, and the render treats it as one it has to earn. Line density is how the map says "steep", so a steep enough slope at a fine enough interval runs its lines together into a solid mass — ask for thirty lines over rough ground and the most interesting of it comes back as a blob. Two things happen where that threatens. The stroke thins to the gap available rather than the gap having to accommodate the stroke, which answers a heavy pen; and where no width would help, the interval itself doubles, and doubles again to the index contours, exactly as a printed sheet drops intermediate lines off a scarp and keeps the ones the eye counts by. Where there is room, neither happens and the line count you asked for is the line count you get.

The same rule runs the other way. Flat country is the one place a contour map has nothing to say — the lines are simply far apart, and the reader gets an expanse of blank paper over ground that may well be doing something. Supplementary lines are the printed answer: an extra contour at half the interval, drawn only where there is room for it and dashed so it cannot be mistaken for part of the real one. Between the two, the interval the map carries stops being a number you set and becomes one the terrain answers.

Depression ticks settle the one ambiguity a contour map has. A closed ring is the same mark around a summit and around a hollow, and nothing in the line says which it is; the convention that separates them is a row of short ticks on the downhill side, pointing into the basin. Here every closed contour is asked which way its own interior falls, and the ones enclosing low ground get ticked, so craters, sinks and dry lake beds stop reading as hills. Below sea level they are left off — a basin already under water has a shoreline to explain it.

Index contours are the cartographer's convention of drawing every fifth line heavier, and they are the reason a real map reads as height rather than as pattern: the eye counts the bold lines and gets elevation for free, where a field of identical lines only gives shape.