← Discover
ASTERXOR / Discover

An island made without drawing a coastline

A few scales of variation and a sea-level threshold can turn numbers into a place-like shape.

A gold contour encloses elevated terrain within a dark synthetic height field.
A seeded mathematical height field; this is not a map of a real island.
DiscoverASTERXOR / LEON LEUNG

Where does the shoreline come from when no one draws it?

The island in these illustrations began as a grid of heights, not an outline. Broad waves establish its shape, smaller waves add detail, and a downward bias toward the edges keeps the surrounding frame underwater. The coastline appears wherever the resulting surface crosses sea level. It is a consequence of the rules, rather than a line traced by hand.

The shoreline is where a surface meets a threshold.
HEIGHT FIRST

Begin with heights rather than borders

A height field assigns one elevation to each horizontal position. Our grid has 420 samples along each side. At first it contains only sums of smooth cosine waves, travelling in several directions with different phases. These waves are numerical building blocks; they are not simulated ocean waves, wind or geological uplift.

The random generator uses seed 813 to choose the directions and phases. Reusing that seed and the same calculation reproduces the same field. A seed does not make the result physically realistic. It makes the choices repeatable, which is valuable when comparing changes instead of accidentally changing every ingredient at once.

A seeded wave field, a radial height bias and their combined terrain.
FIG 01A seeded wave field, a radial height bias and their combined terrain.
MULTIPLE SCALES

Several scales divide the work

Four groups of waves use spatial frequencies proportional to one, two, four and eight. Each group contains six differently directed waves. Higher-frequency groups receive smaller amplitudes, so small ripples decorate broad structures rather than overwhelming them. The recipe resembles common multiscale noise ideas, but it is explicitly a finite cosine sum.

The broadest terms determine where large hills and depressions sit. Finer terms roughen their surfaces and edges. If all terms were small-scale, the result would look busy without a strong overall form. If only broad terms remained, the terrain would be smoother and the shoreline less intricate. Neither extreme is automatically wrong; they serve different visual goals.

Sea-level contours at −0.1, 0 and 0.1 on the same terrain.
FIG 02Sea-level contours at −0.1, 0 and 0.1 on the same terrain.
THE ISLAND BIAS

Give the centre an advantage

Unbiased variation alone need not leave an island surrounded by water. We add a radial term: 0.48 minus 0.9 times the squared distance from the centre, in the grid's normalized coordinates. This favours the middle and lowers the perimeter. The wave field is multiplied by 0.58 before this term is added.

The resulting surface is then compared with sea level zero. Positive cells are land; negative cells are underwater. The script checks that every boundary sample stays below sea level for this chosen seed. That is a verified property of this generated field, not a proof that any coefficients or any random seed would always produce the same kind of island.

A centre-line cross-section separates the two ingredients from their sum.
FIG 03A centre-line cross-section separates the two ingredients from their sum.
THE WATERLINE

Changing water redraws the shore

The contour figure holds the terrain fixed and draws sea levels of minus 0.1, zero and plus 0.1. The outlines move because a different height is selected, not because the underlying land has been regenerated. Low saddles may separate areas at one threshold and connect them at another.

These changes are a useful way to understand contour maps, but the units here are arbitrary. A difference of 0.1 does not mean a tenth of a metre or a prediction of coastal flooding. Converting a toy height field into a real hazard model would require surveyed elevations, vertical reference systems, hydrology and uncertainty information that this illustration does not contain.

MISSING GEOLOGY

The map-like appearance hides missing processes

Real terrain carries the history of erosion, deposition, tectonics, rock strength and water flow. A smooth random field does not reproduce those mechanisms merely because its colours resemble a landscape. River networks and sharp ridges are particularly revealing places where a simple height recipe may fail to resemble plausible geology.

For games or illustration, that limitation can be acceptable. A designer may want an attractive silhouette, navigable slopes or a recognisable landmark rather than an Earth-science simulation. The next step would be to test those goals explicitly. A pretty height map alone does not establish that a character can cross it or that rainfall would drain as expected.

A CREATIVE RECIPE

Repeatability makes visual exploration clearer

The cross-section separates the wave contribution, radial bias and final height along one horizontal line. It exposes the ingredients that the coloured terrain image blends together. Adjusting a single coefficient while preserving the seed makes it easier to attribute an altered coastline to a specific choice.

This is a useful creative pattern beyond landscapes: define a continuous field, combine a few understandable influences, then choose a boundary. The result can be rich without being mysterious. The coastline seems discovered because it emerges indirectly, yet every bend still comes from a rule that can be inspected and changed.

Further reading

NVIDIA GPU Gems 3: Generating complex procedural terrains ↗NumPy: Random generator ↗

Original documentation and useful background.

THE THOUGHT TO TAKE AWAY

The island was not hidden in the random numbers. It was shaped by the choices made around them.