Projectile motion
This simulation needs WebAssembly, and it could not start in this browser.
The image is a frame from a real run. Check that JavaScript is on, or try another browser.
A ball thrown in a vacuum moves at constant speed sideways while it falls with constant acceleration. Galileo put the two motions together in his Two New Sciences (1638), showed that the path is a parabola, and found that a launch at 45° carries farthest. Air resistance spoils both results: the arcs lose their symmetry, the range shrinks, and the best angle drops below 45°. With drag that grows as the square of the speed there is no closed-form solution, so the path has to be computed numerically.
What you see
Nine balls leave the yellow launch point near the bottom left at the same moment and the same speed, at 10°, 20°, 30°, 40°, 45°, 50°, 60°, 70° and 80°. Each angle has its own color, a fading trail and a small label at the launch point. When a ball hits the floor it keeps only part of its vertical speed and bounces; its horizontal speed is not reduced. The side walls reflect the balls without loss. Lengths are in pixels and time in seconds.
Vacuum (no drag): perfect parabolas. With the default px/s² and launch speed of 320 px/s, the 45° ball lands about 530 pixels from the launch point after 2.3 seconds, the farthest of the nine. Complementary angles such as 40° and 50° land almost at the same spot, as predicts. After the bounces die down the balls slide along the floor and keep bouncing between the side walls.
Air resistance: drag coefficient per pixel. The terminal speed px/s is close to the launch speed, so drag matters a lot. The ranges shrink by 15 to 35 percent, more for the longer flights, the arcs come down more steeply than they went up, and the 40° ball now lands slightly ahead of the 45° ball.
High gravity: px/s² without drag. Every length scales as and every time as , so the arcs keep nearly the same shape but are 2.5 times smaller and 2.5 times quicker.
Governing equation
Each ball obeys
integrated with velocity Verlet at a step of 1/120 s. Without drag the solution is
with range , largest at . The launch point sits 16 pixels above the height at which the balls touch the floor, so the measured ranges come out slightly longer than .
Parameters
g (px/s²): downward acceleration, 50 to 600 (default 200).
launch speed: the common initial speed in px/s, 100 to 600 (default 320). Without drag the range grows as .
drag coefficient: in the equation above, 0 to 0.005 (default 0, a vacuum).
bounciness: the coefficient of restitution at the floor, 0 to 1 (default 0.65): the fraction of vertical speed a ball keeps at each bounce. At 0 the balls stop bouncing at once, at 1 they bounce back to full height.
angle labels: shows the launch angle next to the launch point.