Function: deriveCoreRadiusRatio()
ts
function deriveCoreRadiusRatio(gasMassFraction): number;Derives the core/shell split from a body's gas-mass fraction using the solid + gas density references. Assumes a two-phase body:
V_solid / V_total = (1 - f) / ((1 - f) + f · ρ_solid / ρ_gas)coreRadiusRatio = ∛(V_solid / V_total)
Boundary behaviour:
f = 0→1.0(fully solid body, no atmosphere shell)f = 1→0.0(pure gas ball, no core — render code must handlecoreRadius = 0by hiding the core mesh)- monotonically decreasing in
fon[0, 1].
Parameters
| Parameter | Type | Description |
|---|---|---|
gasMassFraction | number | Fraction of the body's total mass carried by its gas envelope, clamped to [0, 1]. |
Returns
number