3D Binary Star System

Two stars orbit their barycentre: set masses, separation and eccentricity, and compare the live orbit with Kepler curves, eclipses, radial velocities and a circumbinary planet.

Switch to 2D

Presets

Playback

Binary system

Camera

Layers

Quality

Model check

The science

What is modelled

Two stars of masses m1 and m2 move around their common centre of mass. The relative orbit is a Kepler ellipse of semi-major axis a and eccentricity e; star A moves on an ellipse of size a m2/M and star B on one of size a m1/M, always on opposite sides of the barycentre. A massless planet moves in the field of both stars (restricted three-body problem), and the light curve and radial velocities are what a distant observer at inclination i would measure.

Equations

  • Gravity: r'' = -G M r / |r|^3 with G = 4 pi^2 in AU, years and solar masses; M = m1 + m2. Star positions: r1 = -(m2/M) r, r2 = (m1/M) r.
  • Kepler III: P^2 = a^3 / M. Energy per unit reduced mass -GM/2a; angular momentum sqrt(G M a (1 - e^2)).
  • Integrator: kick-drift-kick leapfrog with a step proportional to r^1.5, so it takes small steps near periapsis.
  • Radial velocity of star A: v_r = -(-m2/M) v_y sin i (and likewise for B), converted with 1 AU/yr = 4.74 km/s.
  • Eclipses: two uniform discs of radii R1, R2 at projected separation d = sqrt(x^2 + (y cos i)^2); the hidden area is the lens area of two overlapping circles, and the blocked light is that fraction of the rear star's luminosity.
  • Roche lobe (Eggleton): r_L / a = 0.49 q^(2/3) / (0.6 q^(2/3) + ln(1 + q^(1/3))), drawn with a equal to the periapsis separation. The fill % is the star radius over r_L.
  • Planet stability: the Holman-Wiegert fit a_c = a (1.60 + 5.10 e - 2.22 e^2 + 4.12 mu - 4.27 e mu - 5.09 mu^2 + 4.61 e^2 mu^2), mu = m2/M, marks the closest stable circumbinary orbit. The integration shows what really happens.
  • Flux at the planet: S = L1/d1^2 + L2/d2^2 in Earth units; the band 0.35 to 1.1 is a rough habitable range.

Checks run in the page

  • Period measured from successive periapsis passages of the integrated orbit equals 2 pi sqrt(a^3/GM) within 0.3 %.
  • After 10 orbits the specific energy and angular momentum match the analytic values within 0.02 %.
  • The lens-formula eclipse area equals a numerical strip integration, and a central eclipse hides exactly the smaller disc.

Honest simplifications

Stars follow main-sequence scalings R = m^0.8, L = m^3.5 (fine between about 0.4 and 3 solar masses, rough elsewhere), have no limb darkening in the light curve, and are drawn at an enlarged size. The planet is a test particle and does not affect the stars; stellar winds, tides, mass transfer and relativity are ignored. Lighting of the planet is normalised to its orbit so that it stays visible; the flux readout uses the true inverse-square law. Star surfaces, planet and star field were baked in Blender; orbits, glow and everything dynamic are real time.

What to try

  • Use Eclipsing binary with the Edge-on camera and watch the live dot follow the dips in graph 1.
  • Raise e to 0.8 and see the stars race through periapsis (Kepler's second law).
  • Set the planet radius ratio below the red critical line in graph 4: it is thrown out or swallowed.
  • Make m1 much larger than m2 and compare the two radial-velocity amplitudes: their ratio is m2 : m1.
  • Turn on Roche lobes and shrink a until a star nearly fills its lobe.
Loading model...
Loading Blender model...
Light curve (Kepler solution and live dot)
Radial velocities of the two stars (km/s)
Flux at the planet vs time
Planet distance and critical radius
Made with 🟠 Blender · Three.js