Kepler orbit and Earth
The asteroid follows a heliocentric ellipse with elements a, e, i, Ω, ω and mean anomaly M = M0 + n t, n = k / a^1.5 with the Gauss constant k = 0.0172021 AU^1.5/day. Kepler's equation E - e sin E = M is solved by Newton iteration, then r = a(1 - e cos E). Earth moves on its own Kepler ellipse (a = 1 AU, e = 0.0167) in the ecliptic. Planets other than Earth, the Moon's pull on Earth's position and relativity are ignored.
MOID
The minimum orbit intersection distance is the smallest separation between the two orbit curves, min |r_ast(E1) - r_earth(E2)| over both anomalies. It is found here by a coarse 360 x 360 scan followed by iterative local refinement. A small MOID is necessary for a close approach, but not sufficient: both bodies must also be near the crossing point at the same time.
Close approach, speed and focusing
The close-approach distance is the minimum of |r_ast(t) - r_earth(t)| found by Hermite interpolation of the integrated path. The relative speed there is taken as v∞. Inside Earth's gravity the path becomes a hyperbola: conservation of angular momentum b v∞ = q v_p and energy v_p^2 = v∞^2 + 2 μ/q give the perigee q = (μ/v∞^2)(sqrt(1 + (b v∞^2/μ)^2) - 1), so q < b: gravity pulls the path inward, a gravitational focusing. The deflection angle is 2 asin(1/e) with e = 1 + q v∞^2/μ. The slower the pass, the stronger the effect: the effective contact radius is R_E sqrt(1 + v_esc^2/v∞^2). The flyby view integrates Earth's gravity with RK4 and checks it against the closed form.
Yarkovsky drift
Sunlit surfaces re-radiate heat after a delay; the recoil gives a tiny transverse acceleration, modelled as a_T = A2 (1 AU / r)^2 along the direction of motion (A2 in AU/day^2). From Gauss's planetary equation the orbit-averaged drift is da/dt = 2 A2 r0^2 / (n a^2 (1 - e^2)); a Bennu-like A2 = -4.6e-14 gives about -290 m/yr. The mean anomaly then runs away quadratically, ΔM = -(3/4) n (da/dt / a) t^2, so after decades the asteroid arrives hours early or late, which changes the miss distance by thousands of km. A2 depends on size, spin, shape and thermal properties; sign tells prograde (outward) or retrograde (inward) rotation. Values here are typical orders of magnitude, not measurements of any real object.
Uncertainty and Torino-style intuition
Real orbits are known only to some accuracy. Here a cloud of 300 clones with Gaussian timing and inclination errors is propagated, projected on the b-plane (perpendicular to the encounter velocity), and fitted with a 2D Gaussian; integrating it over Earth's contact disc gives a pass probability. The official Torino scale combines probability with kinetic energy; this lab uses only a simplified, illustrative lookup (probability bucket x size class from the absolute magnitude, D = 1329 km / sqrt(p_v) * 10^(-H/5)) and is not the official scale.
Simplifications
- Two-body Sun-asteroid motion; Earth's field acts only in the flyby view (patched conic).
- Earth on a fixed Kepler ellipse; asteroid orbit clones use pure Kepler propagation plus the Yarkovsky shift of the mean.
- Bodies are drawn enlarged; the asteroid mesh is a generic lumpy rock, not a real object.
- Presets are generic examples of orbit classes and are not predictions about any real object.