rayCraters

function rayCraters
universe/src/craters.ts:806
rayCraters(latticeSeed: number, levels: readonly CraterLevel[], grammar: SurfaceGrammar) → readonly RayCrater[]

The young large craters of a body, in age order.

Walked once per body, at sketch derivation, over the levels of the ladder coarse enough to qualify. The walk is the same one levelContribution makes — the same cell test, the same two hashes, the same diameter and jitter — so every crater returned is a crater the height field actually digs.

The cap is not an optimization: it is what makes the per-sample cost a constant. A saturated world has thousands of craters above the cutoff and hundreds of them young, and evaluating a ray pattern against all of them at every sample would cost more than the height field it decorates. Sixteen is about what a real body shows — Luna has two ray systems that dominate and a handful that do not — and taking the youngest sixteen means the ones that survive are the ones with the brightest rays.

latticeSeednumber
Undocumented
levelsreadonly CraterLevel[]
Undocumented
grammarSurfaceGrammar
Undocumented
Returnsreadonly RayCrater[]