Ballistics and Physics Lab
m/s
deg
m
Total Distance
--
m
Maximum Height
--
m
Time of Flight
--
seconds
Key Terms Explained
Projectile Any object launched into the air that travels under gravity alone, with no additional thrust after the moment of launch.
Trajectory The curved path a projectile follows from launch to landing, fully determined by its initial speed, angle, height, and the local gravitational field.
Parabola The geometric shape of a projectile's path in ideal conditions. It is a symmetric curve described by a quadratic equation in x and y.
Initial Velocity (v0) The speed at which the projectile leaves the launcher. It is resolved into horizontal and vertical components using the launch angle.
Launch Angle (theta) The angle above the horizontal at which the projectile is launched. 45 degrees maximizes range from flat ground in a vacuum.
Gravitational Acceleration (g) The constant downward acceleration due to gravity. On Earth it is 9.81 m/s squared. Every second of free fall, a projectile gains 9.81 m/s of downward speed.
Air Resistance (Drag) The opposing force a moving object experiences due to the air it pushes through. This simulator assumes a perfect vacuum, so drag is zero.
Velocity Components The horizontal speed (v0x = v0 times cos theta) stays constant throughout the flight. The vertical speed (v0y = v0 times sin theta) decreases at rate g until the projectile lands.

The Complete Guide to Projectile Motion Physics

Whether you are a physics student checking homework, a game developer tuning ballistics, or just curious about what happens when you throw a ball off a cliff on the Moon, this simulator models the motion using the exact kinematic equations taught in every introductory mechanics course. All calculations happen instantly in your browser with no data sent to any server.

How to Use This Simulator

Set the Initial Velocity (how fast the object leaves the launch point), the Launch Angle (the angle above horizontal), and the Initial Height (height of the launch point above the landing surface). Select a gravity environment and a unit system. The blue trajectory arc, the three hero metrics, and all axis labels update instantly with every input change. The red dot marks the peak altitude (H) and the red dot at the right marks the landing point (R).

The Physics Engine: Step by Step

Step 1 - Angle conversion: theta in radians equals theta in degrees times pi divided by 180. Step 2 - Velocity components: horizontal speed v0x = v0 times cos(theta_rad) remains constant (no drag); initial vertical speed v0y = v0 times sin(theta_rad) decreases as gravity acts. Step 3 - Time of flight: setting y(t) = h0 + v0y times t minus 0.5 times g times t squared equal to zero and solving the quadratic gives T = (v0y + sqrt(v0y squared + 2 times g times h0)) / g. Step 4 - Results: Max Height H = h0 + v0y squared / (2 times g); Total Range R = v0x times T.

The Graph: Cartesian Coordinates with Dynamic Scaling

The canvas displays a Cartesian grid where the horizontal axis is distance (x) and the vertical axis is height (y). The grid scales automatically so the entire arc always fits with padding on all sides. The trajectory arc is drawn by sampling 400 time steps from launch to landing, plotting (v0x times t, h0 + v0y times t minus 0.5 times g times t squared) at each step.

Why Gravity Changes Everything

Because the Moon's gravity (1.62 m/s squared) is roughly one-sixth of Earth's, a ball launched at the same speed and angle would travel about six times farther and soar six times higher. Mars sits between the two at 3.72 m/s squared. Try the Moon preset with a 45-degree launch to see just how dramatic the difference is. The Custom gravity input lets you model hypothetical planets, asteroids, or even artificial gravity environments.

Metric vs. Imperial Units

Toggling the unit switch converts all inputs and outputs between the metric system (m/s and meters) and the imperial system (ft/s and feet). The physics equations are identical in both systems. Only the gravity constant changes value: Earth's 9.81 m/s squared becomes 32.174 ft/s squared. The Moon and Mars presets adjust accordingly.

Frequently Asked Questions

Why does a 45-degree launch angle usually yield the maximum distance? +
When launching from ground level with no air resistance, the horizontal range formula is R = (v0 squared times sin(2 times theta)) / g. This expression is maximized when sin(2 times theta) = 1, which happens at theta = 45 degrees. At this angle, the projectile perfectly balances horizontal speed and time of flight: a steeper angle gives more hang time but sacrifices horizontal velocity, while a shallower angle preserves horizontal speed but the projectile lands too quickly. When launching from an elevated position, the optimal angle drops below 45 degrees because the initial height already extends time of flight, so a slightly flatter trajectory earns more horizontal distance.
Does the mass of the object change its trajectory in an ideal physics simulation? +
No. In an ideal simulation that ignores air resistance, mass has absolutely no effect on trajectory. This follows directly from Galileo's equivalence principle and Newton's second law: F = m times g (gravitational force is proportional to mass), and F = m times a (inertia also scales with mass), so the mass cancels out and every object experiences the same acceleration g. A bowling ball and a feather released in a vacuum fall at exactly the same rate and follow identical parabolic arcs when launched with the same speed and angle. Galileo famously demonstrated this by dropping objects from the Tower of Pisa.
How does launching from a cliff (initial height) change the optimal launch angle? +
When launching from an elevated position, the optimal angle for maximum range is always less than 45 degrees. The extra height means the projectile is already partway through its vertical journey before it even reaches ground level, so a flatter launch trajectory takes better advantage of the available fall distance. As a rough intuition: for a very tall cliff where the height completely dominates the launch energy, the optimal angle approaches 0 degrees because a nearly horizontal shot maximizes horizontal velocity while the cliff provides all the drop time you need. Try setting initial height to 200 m in the simulator and varying the angle to see this effect.
Why does this simulator ignore air resistance? +
Air resistance (drag) is ignored because it depends on the object's shape, size, cross-sectional area, surface roughness, and velocity in a complex nonlinear way. The drag force is F_drag = 0.5 times Cd times rho times A times v squared, where Cd is the drag coefficient (different for a sphere vs. a bullet vs. a feather), rho is air density, and A is cross-sectional area. Incorporating drag correctly requires knowing these object-specific properties, which would make the simulator specific to one object rather than a general physics tool. The vacuum model used here is the standard starting point in every introductory physics course and gives accurate results for dense, compact objects at moderate speeds over short distances.
Educational Simulator: This tool models ideal projectile motion with no air resistance, spin, or wind effects. Results represent theoretical physics in a vacuum and will differ from real-world ballistics. All calculations are 100% client-side; nothing is ever sent to a server.