Comet Tails (2D)
2D Keplerian comet-tail lab: elliptical orbits with true angular-momentum-conserving speed, and dust/ion tails that always point radially away from the Sun and lengthen near perihelion.
This 2D companion replaces the original's fixed angular step with real Keplerian mechanics: each comet's true anomaly is integrated from a conserved angular momentum, so orbital speed correctly peaks at perihelion and drops at aphelion, and the dust/ion tail is recomputed every frame to point straight away from the Sun with a length that grows as the comet nears it — the same solar-wind sublimation effect that gives real comets their brightest tails at closest approach.
2D Keplerian comet-tail lab with angular-momentum-conserving orbital speed and a Sun-relative dust/ion tail that lengthens near perihelion.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install
Solar wind and radiation pressure push a comet's dust and ionized gas radially outward from the Sun, regardless of which way the comet is moving. That is why a comet's tail can appear to lead it on the outbound leg of its orbit.
The orbit conserves angular momentum (Kepler's second law): h = r² · dθ/dt stays constant, so as the orbital radius r shrinks near perihelion, the angular speed dθ/dt must rise to compensate.