Presets
Playback
Orbit
Masses and the orbit set the period.
Stars
Sizes and temperatures set the eclipse depth.
Layers
Model checks
The science
Two bodies, one ellipse
Two stars orbit their common centre of mass. Subtracting the two Newtonian equations leaves a one-body problem for the separation vector r with total mass M = M1 + M2:
d2r/dt2 = − G M r / r3, r1 = −(M2/M) r, r2 = +(M1/M) rThe solution is a Kepler ellipse with semi-major axis a and eccentricity e. In astronomical units, years and solar masses G = 4π2 and Kepler's third law reads
P2 = a3 / (M1 + M2), E = −G M1M2 / 2a, vperi = √(G M (1+e) / (a(1−e)))The heavier star moves on the smaller ellipse. The page integrates the relative orbit with RK4 and a time step proportional to r3/2 (small near periastron) and measures the period between periastron passages, the drift of the energy and the angular momentum.
Radial velocities and eclipses
An observer at inclination i sees the line-of-sight velocity vz,1 = −(M2/M) vy sin i and vz,2 = +(M1/M) vy sin i (curves in the first graph; the ratio of amplitudes K1/K2 = M2/M1 gives the mass ratio). When the projected separation is smaller than R1 + R2 one star passes in front of the other. The light curve is computed from the overlap area of two uniform discs, with flux ∝ R2T4 (Stefan-Boltzmann).
Honest simplifications
- Point masses and Newtonian gravity: no tides, mass transfer, general relativity or apsidal precession. For very close pairs (the Algol-like preset) real stars would be tidally distorted.
- Uniform stellar discs without limb darkening, gravity darkening or reflection; the eclipse depths are therefore only approximate.
- The argument of periastron is fixed (periastron on the +x axis of the sky), so the eclipse phases are those of a particular orientation.
- Star sizes in the top view are drawn for visibility, not to scale; the sky-view inset has the same exaggeration.
- Presets are illustrative numbers of the right order, not catalogue values.
What to try
- Run Sun and red dwarf, watch both ellipses share a focus at the centre of mass; the lighter star travels farther and faster.
- Run Very eccentric: the stars hurry past periastron and linger at apastron (Kepler's second law); the step size shrinks automatically.
- Run Close eclipsing pair: set the inclination to 90 and see the two dips in the light curve; lower it below ~80 and the eclipses vanish.
- Double both masses: the period falls by a factor sqrt(2), and K1/K2 still equals M2/M1.