Same real physics as the 3D version — two stars orbit their barycenter on a fixed Keplerian ellipse while a massless planet is integrated with 4th-order Runge–Kutta under their combined, time-varying gravity. This 2D view adds something the 3D scene can't show at a glance: it's drawn in the frame co-rotating with the binary's mean motion, with the planet's Hill (zero-velocity) forbidden zone shaded live.
Jacobi constant: C_J = 2·U(x,y;t) − |v_rot|²
U(x,y;t) = G·m1/d1(t) + G·m2/d2(t) + ½Ω²(x²+y²)
a_crit/a_bin = 1.60 + 5.10 e − 2.22 e² + 4.12 μ − 4.27 e μ − 5.09 μ² + 4.61 e² μ² (Holman & Wiegert 1999)
For a circular binary (ebin=0) the rotating-frame potential is static and CJ is an exact conserved quantity — the shaded forbidden zone stays fixed and a bound orbit can never cross it. Set ebin above zero and the stars' separation oscillates even in this frame, so the potential — and the forbidden zone's boundary — flexes each binary orbit. The planet's own CJ (fixed at launch) then slowly drifts relative to that flexing field: this drift is the chaotic energy pumping that eventually ejects planets below acrit, and the drift readout below grows visibly faster the closer ap sits to the predicted boundary.
- μ, ebin sliders — set the binary's mass ratio and eccentricity; acrit and the shaded Hill zone update live.
- ap slider + Launch — place the planet on a circular orbit at that radius (in the inertial frame) and start the RK4 integration.
- Snap to acrit — sets ap exactly to the predicted boundary so you can watch the marginal case slowly leak energy and diverge.
- Jacobi drift — stays near machine precision for ebin=0 (true conservation); grows measurably for ebin>0, and grows fastest right at acrit — the numerical signature of the instability the Holman & Wiegert formula was fitted to.