orbital-engine
    Preparing search index...

    Function sampleBeltParticles

    • The statistical scatter for a belt with no real positions: per particle (radius km, angle rad, elevation rad), packed into one array.

      • Seeded from the belt's id, so the same belt scatters identically on every load rather than "sparkling" to a new pattern each time.
      • For a 'ring' or 'cluster', radius is drawn uniformly by AREA (r = √(r₀² + u(r₁² − r₀²))), not uniformly by radius — uniform-by- radius piles particles up at the inner edge, where each ring of the belt has less area to spread over. Elevation is spread uniformly across ±half the inclination spread (see BeltRegion. inclinationSpreadDeg) — thin enough that the sphere's curvature doesn't matter.
      • For a 'shell', the same reasoning one dimension up: radius uniform by VOLUME (r = ∛(r₀³ + u(r₁³ − r₀³))), and elevation uniform by SOLID ANGLE (sin φ uniform, capped at ±half the spread — 180° is the full sphere). Real, observed bug: shells used the ring sampling, which is pole-heavy (uniform in angle crowds the poles' shrinking circles) and inner-heavy (r² rather than r³) — and the Oort cloud's spread of 90 drew only a ±45° band, not a cloud.
      • Radii inside any of the belt's gaps are redrawn.
      • Angle is spread round the full circle, or across ±half the angular spread for a co-orbital population (added to its live reference angle at render time — see resolve.ts's coOrbitalReferenceAngle).

      Every particle makes the same draws in the same order whatever the shape, so changing how one shape maps them never reshuffles another's.

      Parameters

      Returns Float32Array