3D Projectile Motion

Launch a ball on Earth, the Moon, Mars or Venus: gravity, air drag, launch angle and range with a target.

Switch to 2D

Presets

Playback

Launcher

World and target

Camera

Layers

Quality

Model check

The science

What is modelled

A ball launcher on a lift column fires a ball over a field. You choose the speed, the angle, the muzzle height, the ball, the gravity of the world (Earth, Moon, Mars, Venus, Titan, Ceres or any value) and the air density. The ball flies under gravity and, if there is air, quadratic drag. A dashed curve shows the same shot in a vacuum, and a bull's-eye target tells you whether you hit.

Equations

  • Vacuum: x = v cosθ · t, y = h + v sinθ · t − ½ g t²; flight time tf = (v sinθ + √(v² sin²θ + 2 g h)) / g; maximum height h + v² sin²θ / 2g; the best angle is θ* = arctan( v / √(v² + 2 g h) ), which is 45 deg only for h = 0.
  • Air drag: F = ½ ρ Cd A v² opposite to the velocity, so dv/dt = −g − (k/m) |v| v with k = ½ ρ Cd A; terminal speed vt = √(2 m g / (ρ Cd A)).
  • The trajectory is integrated with fourth-order Runge-Kutta (step 2.5 ms) and the landing point is found by interpolation.
  • Energy: E = ½ m v² + m g y; the loss in air equals ∫ k |v|³ dt.

Checks run in the page

  • In a vacuum the integrator reproduces the closed-form range, flight time and maximum height.
  • Energy is conserved in a vacuum, and in air the energy lost equals the work done by the drag force.
  • A dropped ball approaches the analytic terminal speed.

Honest simplifications

  • The drag coefficient is a constant per ball (real ones change with speed and spin), there is no wind, no spin (Magnus force), no rotation of the planet and gravity does not change with height. Air density is uniform. The ball is drawn larger than life at long range so that it stays visible. Air densities of the worlds are rounded surface values; Venus and Titan numbers are approximate.

What to try

  • Use "Best angle (with drag)" on Earth with and without air and compare it with 45 deg and with the vacuum best angle for a high platform.
  • Fire the same shot on the Moon, on Mars and on Venus.
  • Increase the platform height and watch the best vacuum angle fall below 45 deg.
  • Use "Aim at the target" and then change the ball: the heavy ball loses less to drag.
Loading model...
Loading Blender model...
Trajectory: with drag and in vacuum
Speed and velocity components
Range vs launch angle
Made with 🟠 Blender · Three.js