See the five Lagrange points of any two-body system on a 3D effective-potential surface in the rotating frame. Computes L1–L5 distances, the Hill sphere and stability for Sun–Earth, Earth–Moon, Sun–Jupiter or your own masses, and launches test particles to show halo and tadpole orbits.
Two masses orbit their common centre on circles. In a frame rotating with them, a third, tiny body feels gravity from both plus the centrifugal effect, which combine into an effective potential Ω = −(1−μ)/r₁ − μ/r₂ − ½(x² + y²) in units where R = 1, total mass = 1 and ω = 1. The surface you see is Ω (clipped near the masses); the five flat spots are the Lagrange points, where all forces balance.
∂Ω/∂x = 0 with Newton's method (exact to machine precision, not the cube-root approximation). They are saddle points — unstable, which is why JWST (Sun–Earth L2) and SOHO (L1) fly station-keeping halo orbits.μ < 0.03852 (Routh's criterion, M₁/M₂ ≳ 25) — home to Jupiter's Trojan asteroids.R ∛(μ/3): roughly where M₂'s gravity dominates for satellites.T = 2π √(R³ / (G(M₁+M₂))), G = 6.6743×10⁻¹¹.Test particles are integrated in the rotating frame (including Coriolis) with RK4. Real Sun–Earth μ ≈ 3×10⁻⁶ makes the Earth's well invisible, so the picture exaggerates μ by default; all numbers always use the true masses. Sun–Earth L1/L2 come out ≈ 1.49–1.50 million km from Earth.