Position follows Kepler's equation, solved by Newton iteration each frame:
M = n t, n = 2π/T, T = a^1.5 yr (GM☉ = 4π² AU³/yr²)
M = E − e sin E
r = a (1 − e cos E), a = q/(1 − e)
v² = GM (2/r − 1/a) (vis-viva)
dA/dt = ½ r² dν/dt = ½ n a b (equal areas)
Ion tail. Ions are swept by the solar wind (about 400 km/s). In the comet's frame the wind arrives from the direction 400·r̂ − vcomet, so the tail is not exactly anti-sunward but tilted by atan(v⊥/400) (the aberration angle shown above).
Dust tail. Each grain is released from the nucleus at an earlier time with the comet's own velocity, then flies under the Sun's gravity reduced by radiation pressure, GM(1 − β) (leapfrog integration, β = Frad/Fgrav from about 0.05 to 0.9 for big and small grains). Small grains (large β) form the straight edge, big grains lag and curve, which is the real "syndyne" picture.
Honest simplifications. Pure two-body motion (no planets, no non-gravitational jet forces, which shift real comet timing by days). Outgassing uses the water-ice scaling Q ∝ r⁻² and is shown as a relative number; tail lengths and the grain release rate are illustrative, not fitted. The nucleus (real size 1 to 20 km) and the Sun are drawn about a million times too large so you can see them; the probe in the inset is not to scale either. The solver, equal-area law and an independent RK4 integration are verified with the button above.