Two point masses m1, m2 attract each other with Newton's law. The problem reduces to one body of reduced mass moving in the field of the total mass M = m1+m2; both stars orbit their common barycentre.
r₁ = −(m₂/M) r, r₂ = (m₁/M) r, r = r₂ − r₁ d²r/dt² = −G M r / |r|³ T² = a³ / M (T in years, a in AU, M in solar masses; G = 4π²) K₁ = (2πG/T)^(1/3) m₂ sin i / (M^(2/3) √(1−e²))The page integrates the relative orbit with the symplectic velocity-Verlet scheme (6000 steps per orbit on screen, 40,000 in the checks). The three checks compare the measured period with Kepler's third law, verify energy conservation, and compare the integrated radial-velocity semi-amplitude with the closed-form K1.
Simplifications: point masses (no tides, mass transfer or relativity), the orbit plane is fixed, and the real stars' orbits are only drawn in the plane; inclination affects only the radial-velocity readout. Real system parameters are rounded literature values.