irregularFigure

function irregularFigure
universe/src/system.ts:1115
irregularFigure(rng: Rng, meanRadius: number) → { figure: BodyFigure; polarRadius: number; radius: number } | null

A generated body's figure, from the twenty-five that have been measured.

The numbers below are not invented. data/shapes/manifest.json holds published shape models of everything from a 13 m rock to Vesta, and the distribution across them is:

                                   min    median      max
  b / a                           0.43      0.74     0.99
  c / b                           0.71      0.87     1.00
  rms(r) about the fitted         0.023     0.090    0.61
    ellipsoid, over the mean

The third row is the residual after the ellipsoid is taken out, which is what BodyFigure.irregularity means — the elongation is already carried by the two rows above it, and measuring the roughness against a sphere would count it twice.

The one clear trend is the threshold: the two bodies above 200 km — Vesta and Proteus — have a/c of 1.21 and 1.09, and everything below it is scattered from 1.05 (Mathilde, a ball) to 2.89 (Eros, a banana) with no strong size dependence inside the range. So the model is a threshold plus a spread, not a formula: elongation is switched on below ROUNDING_RADIUS and ramps with how far below, and within that it is a wide draw, because that is what the measurements say. A tidy monotonic function of radius would fit the data worse and look more scientific, which is the wrong trade.

Returns null for a body gravity has rounded — the caller keeps its spheroid, including its rotational flattening, which is a different and real effect.

rngRng
Undocumented
meanRadiusnumber
Undocumented
Returns{ figure: BodyFigure; polarRadius: number; radius: number } | null