This is a 2D secular (orbit-averaged) companion to the 3D direct-integration version. Instead of stepping the fast day-to-day orbital motion, it evolves each comet's slowly-changing orbital elements — semi-major axis a, eccentricity e, argument of perihelion ω — directly, using the disturbing function of the galactic disk's vertical tide averaged over one orbit (Byl 1983; Heisler & Tremaine 1986). This is the same mathematical structure as the Kozai–Lidov mechanism, with the tide's flattened mass sheet playing the role of the perturbing body:
n = 2π / a^1.5 (mean motion, GM☉=4π², AU/yr units)
ε = K·ρ / (2n), K = 4πGρ0 (tidal coupling rate)
de/dt = (5/2)·ε·e·√(1−e²)·sin²i·sin(2ω)
dω/dt = ε·[2(1−e²) + 5sin²ω(e²−sin²i)] / √(1−e²)
q = a(1−e) → dq/dt = −a·de/dt
Simplifying assumptions (stated explicitly, unlike a black box): each comet's inclination i to the galactic plane is drawn once from an isotropic cloud and then held fixed — only e and ω are secularly evolved, since a flat 2D view has no axis to draw a changing 3D tilt against. Semi-major axis a does not change (the tide does no net secular work on it, matching the real theory). The drawn ellipse is a bird's-eye view from the galactic pole; i only sets how strongly that individual comet is torqued (the sin²i factor), it is not itself visualized. A comet's fast orbital position (the moving dot) is still a real Kepler propagation of the current osculating a, e, ω, solved via Newton's method each frame — only the slow drift of the ellipse's shape and orientation comes from the averaged equations above.
- Local density ρ0 — linearly scales the tidal coupling constant K, using the real Oort value 0.10 M☉/pc³ at 1×.
- Galactic plane coupling — a simplified stand-in for the 3D model's plane tilt: it scales how efficiently the vertical tide couples into the ensemble (sin² of the angle), since an isotropic cloud's aggregate statistics don't otherwise depend on the tilt's absolute orientation.
- Time acceleration — real secular periods run tens to hundreds of Myr; only playback speed changes, the integration step stays fixed and stable.
- Loss-cone threshold — the perihelion distance below which giant-planet perturbations take over and the comet becomes an observable long-period comet.