Physics · Introductory

Projectile motion

Written by SignalsLab

Early edition: these lessons are being reviewed.

Content

Summary

Projectile motion is the motion of an object launched into the air that is acted on only by gravity (ignoring air resistance). Horizontal and vertical motions are independent: horizontal velocity stays constant while vertical velocity changes at a constant downward acceleration g. Together they produce a parabolic path.

Intuition

Imagine two balls released at the same instant from the same height: one dropped straight down, one thrown sideways. They hit the ground together, because gravity acts only vertically and does not care how fast the ball moves sideways. So treat the motion as two separate one-dimensional problems linked by time. Sideways, nothing pushes the ball, so it coasts at constant speed. Vertically, gravity steadily pulls it down, slowing the rise, stopping it at the peak, then speeding the fall. Plotting height against horizontal distance gives a parabola. In a simulation, you can change launch speed and angle and watch how range and maximum height respond.

Key equations

vx=v0cos⁡θ,vy0=v0sin⁡θ
(1)

Components of the launch velocity at angle θ above horizontal.

x=v0cos⁡θt
(2)

Horizontal position: constant velocity motion.

y=v0sin⁡θt−12gt2
(3)

Vertical position under constant downward acceleration g=9.8 m/s2.

vy=v0sin⁡θ−gt
(4)

Vertical velocity changes linearly with time.

R=v02sin⁡2θg,H=v02sin2⁡θ2g
(5)

Range on level ground and maximum height.

Derivation

  1. Resolve the launch velocity: horizontal component v0cos⁡(θ), vertical component v0sin⁡(θ).
  2. Horizontal acceleration is zero, so x=v0cos⁡(θ)t.
  3. Vertical acceleration is −g, so y=v0sin⁡(θ)t−12gt2.
  4. The ball lands on level ground when y=0: t(v0sin⁡(θ)−gt/2)=0, giving flight time T=2v0sin⁡(θ)/g.
  5. Range R=v0cos⁡(θ)T=2v02sin⁡(θ)cos⁡(θ)g=v02sin⁡(2θ)g.
  6. At the peak vy=0, so t=v0sin⁡(θ)/g; substituting into y gives H=v02sin2⁡(θ)/(2g).
  7. Range is maximal when sin⁡(2θ)=1, i.e. θ=45 degrees.

Worked example

Problem

A ball is kicked from level ground at 20 m/s at 30 degrees above horizontal. Find the flight time, maximum height and range. Use g = 9.8 m/s^2.

  1. v0x = 20 cos30° = 17.3 m/s; v0y = 20 sin30° = 10 m/s.
  2. Flight time T = 2(10)/9.8 = 2.04 s.
  3. Maximum height H = 10^2/(2×9.8) = 5.10 m.
  4. Range R = 17.3 × 2.04 = 35.3 m (check: 400 × sin60°/9.8 = 35.3 m).

Answer T ≈ 2.04 s, H ≈ 5.1 m, R ≈ 35.3 m

Common mistakes

  • Thinking a horizontal force is needed to keep the object moving sideways.
  • Setting vertical velocity to zero at the top and then also assuming acceleration is zero; acceleration is still g.
  • Using degrees/radians inconsistently or forgetting to resolve into components.
  • Using the range formula when launch and landing heights differ.
  • Assuming a heavier object falls faster; without air resistance mass does not matter.

Animation

Animation coming soon

The animated version of this lesson is being prepared for the web. In the Signals AI app, lessons are drawn step by step.

Code

scene.py(77 lines)
import sys
import numpy as np
from manim import *
from blocks import *

G = 9.81
V0 = 14.0
ANGLES = [30, 45, 60]
COLORS = [C_MAIN, C_GOOD, C_ACCENT]


def simulate(angle_deg, v0=V0, dt=0.01):
    """Fixed-step Euler-free simulation using exact kinematics at each step; returns (x, y) lists."""
    a = np.radians(angle_deg)
    vx, vy = v0 * np.cos(a), v0 * np.sin(a)
    xs, ys = [], []
    t = 0.0
    while True:
        y = vy * t - 0.5 * G * t * t
        if y < 0 and t > 0:
            break
        xs.append(vx * t)
        ys.append(y)
        t += dt
    return np.array(xs), np.array(ys)


def landing_range(angle_deg, v0=V0):
    """Analytic range for comparison."""
    return v0 ** 2 * np.sin(2 * np.radians(angle_deg)) / G


class Main(Scene):
    def construct(self):
        # Title
        TitleCard(self, "Projectile motion", "Launch angle and range")

        # Axes
        axes = Axes(x_range=[0, 22, 5], y_range=[0, 12, 5], x_length=10, y_length=4.2,
                    axis_config={"color": C_DIM, "include_tip": False})
        axes.shift(DOWN * 0.4)
        xl = Text("x (m)", font_size=24).next_to(axes.x_axis, DOWN, buff=0.15)
        yl = Text("y (m)", font_size=24).next_to(axes.y_axis, LEFT, buff=0.15)
        self.play(Create(axes), FadeIn(xl), FadeIn(yl))
        StepCaption(self, "Constant gravity: x grows steadily, y curves down")

        # Draw simulated trajectories
        legends = VGroup()
        ranges = {}
        for ang, col in zip(ANGLES, COLORS):
            xs, ys = simulate(ang)
            ranges[ang] = xs[-1]
            pts = [axes.c2p(x, y) for x, y in zip(xs[::5], ys[::5])]
            path = VMobject(color=col, stroke_width=4).set_points_as_corners(pts)
            dot = Dot(pts[0], color=col, radius=0.1)
            self.add(dot)
            self.play(Create(path), MoveAlongPath(dot, path), run_time=2.2, rate_func=linear)
            lab = Text(f"{ang}°: {xs[-1]:.1f} m", font_size=24, color=col)
            legends.add(lab)
        legends.arrange(DOWN, aligned_edge=LEFT, buff=0.15).to_corner(UR, buff=0.5).shift(DOWN * 0.6)
        self.play(FadeIn(legends))
        StepCaption(self, "45° gives the longest range; 30° and 60° land together")
        self.wait(1)


if __name__ == "__main__" and "--selftest" in sys.argv:
    for ang in ANGLES:
        xs, ys = simulate(ang)
        assert abs(xs[0]) < 1e-9 and abs(ys[0]) < 1e-9
        assert abs(xs[-1] - landing_range(ang)) < 0.2
        a = np.radians(ang)
        hmax = (V0 * np.sin(a)) ** 2 / (2 * G)
        assert abs(ys.max() - hmax) < 0.05
    r30, r45, r60 = [simulate(a)[0][-1] for a in ANGLES]
    assert r45 > r30 and r45 > r60
    assert abs(r30 - r60) < 0.2
    print("ok")

The Manim scene code that draws this lesson's animation in the Signals AI app (Python, Manim Community).

ccBYNC© 2026 SignalsLab. Lesson text shared as is under CC BY-NC 4.0.