API Reference / bodySource · function

Function: bodySource()

function bodySource(body): XyzSource;

The heliocentric xyz source for one authored body — the per-body engine behind every tier, and the exact object Engine.registerSource consumes.

  • placement sits on a very distant sphere so its direction (longitude) is fixed and parallax-free from any vantage.
  • periodic is a circular, coplanar orbit (e = 0, i = 0) whose radius follows Kepler's third law in the system's units (a = periodDays^(2/3)), so an inner body both moves faster and orbits tighter — making outer bodies show apparent retrograde near opposition, just like the real sky. Its heliocentric longitude is exactly phaseDeg + 360·(t − epoch)/periodDays.
  • kepler is the full constant-element solver (KeplerOrbit).

Parameters

ParameterTypeDescription
bodySyntheticBodyThe authored body.

Returns

XyzSource

An XyzSource yielding heliocentric ecliptic xyz at time t.

Start building

Quickstart →