coastRemap

function coastRemap
universe/src/bands.ts:832
coastRemap(elevation: number, sea: number, width: number) → number

The coast: the landform pulled toward the sea datum on both sides of it.

A noise field crossing a datum makes a coastline, and it makes one with the slope of the noise — the shore is a cliff, the sea is deep a hundred meters out, and there is nowhere for the water to be shallow. Compressing the elevation toward the datum inside a band on each side widens the shelf under the water and lays a plain behind the beach, and the compression is C¹ at the band's edge — the smoothstep's slope is zero there — so nothing creases where the remap lets go. The two sides differ on purpose: a shelf is wider and flatter than a coastal plain, and the waterline itself keeps a kink between them, which is what a beach is.

width is in meters and is the caller's — COAST_SHAPE.width of the hypsometry share, which is the scale the datum itself is set on.

elevationnumber
Undocumented
seanumber
Undocumented
widthnumber
Undocumented
Returnsnumber