Governing equations
In barycentric rotating coordinates, the Sun and Jupiter remain fixed. The asteroid is a massless test particle:
ẍ − 2ẏ = x − (1−μ)(x+μ)/r₁³ − μ(x−1+μ)/r₂³
ÿ + 2ẋ = y − (1−μ)y/r₁³ − μy/r₂³
C = x² + y² + 2(1−μ)/r₁ + 2μ/r₂ − ẋ² − ẏ²
Here r₁ and r₂ are distances to the Sun and Jupiter; μ = M♃/(M☉ + M♃). The engine advances the equations with fixed-step fourth-order Runge–Kutta.
Real values vs scaled
G, the Sun's mass, Jupiter's mass and Jupiter's 5.2044 AU orbital radius are textbook values. Distance is normalized by that radius and time by 1/n, so the rotating-frame equations are dimensionless. The displayed AU, km/s and years are converted back to physical units.
The default 1.00 M♃ is textbook Jupiter; slider changes are illustrative. The initial displacement is illustrative. The model is planar and circular, treats the asteroid as massless, and omits Saturn, other planets, eccentricity and non-gravitational forces. The bodies are enlarged for visibility; their plotted sizes are not to scale.
Topic selection: candidates were halo orbits, horseshoe/tadpole motion, Kozai–Lidov cycles, bi-elliptic transfers, gravity assists and resonance chains. Gravity assists, halo orbits and Kozai–Lidov cycles were set aside as the best-known; the horseshoe regime was selected for its unusual co-orbital exchange.
Illustrative educational model, not affiliated with any real institution or manufacturer.