The shell is a point mass launched with speed v0 at angle θ. Two forces act on it in flight: constant gravity pulling straight down, and quadratic aerodynamic drag opposing its velocity vector, proportional to the square of speed and a drag coefficient.
a = g + (-1/(2m)) * ρ * Cd * A * |v| * v
x(t+dt) = x(t) + v(t)·dt
v(t+dt) = v(t) + a(t)·dt (semi-implicit Euler, dt clamped ≤ 0.05s)
Here g = (0, -9.81, 0) m/s², ρ = 1.225 kg/m³ (sea-level air density), A is the projectile's cross-sectional area, and m is its mass. Heavier shells have more momentum relative to their drag area, so they resist deceleration better — a direct consequence of Newton's second law, F = ma.
- Muzzle velocity — sets the initial speed v0 of each shot.
- Launch angle — sets θ, the elevation of the barrel above horizontal.
- Drag coefficient — scales aerodynamic resistance from 0 (vacuum, pure Newtonian parabola) to a draggy 1.0.
- Projectile mass — heavier rounds carry more inertia per unit drag, flattening the effect of air resistance.
- Fire — launches a new shell from the cannon using the current settings; up to 6 trails are kept.
Real artillery fire-control computers solve exactly this drag-augmented trajectory (plus wind and Coriolis terms) to predict where a shell will land before it is ever fired.