craterLadder

function craterLadder
universe/src/sketch.ts:449
craterLadder(grammar: SurfaceGrammar, floor: number, limit: number) → readonly CraterLevel[]

The crater field's lattice ladder, coarsest first.

Each level halves the diameter and doubles the cells per axis, which quadruples the cell count — so one crater per cell reproduces a cumulative size–frequency slope of −2 for free, which is the lunar highlands at saturation (Robbins 2018). Nothing has to enforce the slope; it is the geometry.

The production slope is steeper than −2, and that is where density comes in: an unsaturated surface is thinned at the large end and approaches saturation at the small end, because small craters accumulate faster than they are destroyed. So the per-level chance climbs toward 1 as the diameter falls, and a young surface has a steeper distribution than an old one rather than the same one scaled down.

The ladder is a property of the body, not of the patch, and the obvious alternative is what makes that worth stating. Stopping the ladder at each patch's own sample spacing would be free detail control — an orbital patch would not pay for boulder-scale craters — and it breaks the morph. A CDLOD child hands over by sliding its vertices onto its parent's grid, so a fully morphed child is the child's own field sampled at the parent's spacing; that equals the parent's mesh only if both evaluate the same function. Two patches with different ladders differ by every crater between their two floors, and at level 12 on a lunar-sized body that is eight meters of pop at the handover. One field, one ladder, and the cost ceiling is MAX_CRATER_LEVELS.

grammarSurfaceGrammar
Undocumented
floornumber
Undocumented
limitnumber
Undocumented
Returnsreadonly CraterLevel[]