Projectile motion (with air resistance)
Without air, a thrown ball follows a parabola and 45° goes furthest from the ground. Air pushes back harder the faster the ball moves, so a real ball falls short, comes down more steeply than it went up, and goes furthest at a lower angle. Set the drag to 0 to see the textbook case.
The physics
- No air: x = v cos θ · t, y = h + v sin θ · t − ½ g t². From the ground the range is v² sin 2θ ÷ g; from a height h the flight lasts t = (v sin θ + √((v sin θ)² + 2 g h)) ÷ g.
- With air: drag pushes against the motion with F = ½ ρ Cd A v², where A = π d² ÷ 4 is the ball's cross-section. There's no formula for the path, so it is integrated with fourth-order Runge–Kutta in steps of 2 ms or less.
- Terminal speed: falling straight down, drag balances weight at vt = √(m g ÷ (½ ρ Cd A)).
Air density ρ = 1.227 kg/m³, from NASA Glenn's standard-atmosphere model at sea level (Earth atmosphere model), and g = 9.81 m/s². NASA gives a sphere's drag coefficient as anywhere from 0.07 to 0.5 depending on the flow (Shape effects on drag); 0.5 is the default here. Spin, wind and a drag coefficient that changes with speed are left out. Tested: with no air the simulation matches the formulas above to a micrometre; with air it doesn't change when the time step is halved, the ball's energy only ever falls, and a straight drop follows the exact vt tanh(g t ÷ vt) curve (packages/mechanics/test/science.test.ts).
Example
With launch speed 30 m/s, launch angle 35°, launch height 1 m, drag coefficient × 100 = 50, ball diameter 74 mm, ball mass 145 g: range: 57.8 m; range with no air: 87.6 m (34% less with air); highest point: 12.9 m; time in the air: 3.18 s; lands at: 19.9 m/s at 47°; terminal speed: 32.8 m/s. Open this setup, then change one thing at a time.
Related: Kepler orbit · Pendulum period · Spring–mass–damper