Exploring Mechanics / 1. Kinematics

1. Kinematics: Describing Motion

Kinematics describes how objects move without yet explaining why they move.

Constant Velocity

Make a prediction first: you walk 3 steps forward, then 1 step back. How far have you walked? Where do you end up, measured from where you started? Those are two different questions with two different answers — that gap is the entire distinction this tab is built around.

x — position (where something is, measured from a chosen origin)
Δx — displacement (net change in position, end minus start — a vector, can be negative)
distance — total length of path travelled (always ≥ 0, never subtracts)
t — time; Δt — elapsed time
v — velocity, v = Δx / Δt (a vector — sign/direction matters)
speed — magnitude of velocity, |v| (always ≥ 0)
For math enthusiasts: distance vs. displacement, speed vs. velocity

Walk 3 m forward then 1 m back: distance travelled = 3 + 1 = 4 m (you add up every bit of path, regardless of direction). Displacement = +3 + (−1) = +2 m (steps backward subtract, because displacement is a vector pointing from your start to your end). Average speed = total distance / total time. Average velocity = displacement / time. They agree only when you never change direction — the moment you turn around, distance keeps climbing while displacement can shrink, stall, or reverse sign.

Widget 1 — Motion Graph Lab

Set a starting position and a (signed) velocity — negative means moving left — and press play. Watch the dot on the track and the two graphs move in lock-step: the position-time graph is a straight line because the position changes by the same amount every second; the velocity-time graph is flat because the velocity never changes at all.

Track

Position vs. time — x(t) = x₀ + vt

t (s) x (m)

Velocity vs. time — flat line at v

t (s) v (m/s)
Starting position, x₀−10 m
Velocity, v (negative = leftward)3 m/s
Elapsed time, t0.0 s
Position, x(t)−10.0 m
Displacement so far0.0 m
For math enthusiasts: why slope and area mean what they mean

Average velocity between any two points on the position-time graph is "rise over run": (x2 − x1) / (t2 − t1) — exactly the slope of the line connecting them. For constant velocity that slope is identical everywhere, which is why the graph is a single straight line, and why that one number, the slope, fully determines the motion.

On the velocity-time graph, the shaded rectangle from 0 to t has width t and height v, so its area is v·t — which is exactly the displacement, Δx = vt. This isn't a coincidence: "area under a velocity-time graph equals displacement" stays true even when velocity isn't constant (you'll see that rectangle turn into more complicated shapes once acceleration enters the picture in the next tab).

Widget 2 — Two-Runner Catch-Up Challenge

Runner A has a head start; Runner B starts behind but can run faster. Tune B's speed to find out whether — and exactly when and where — B catches A. This is the same question as one car overtaking another on a highway, or a police car catching up to a speeder: same head start, same "who's faster" logic.

A B

Runner A (head start, front)

Speed3.0 m/s

Runner B (starts behind)

Head start distance (how far behind A)20 m
Speed5.0 m/s
Catch-up time—
Catch-up position—
Verdict—
For math enthusiasts: solving the catch-up algebraically

Let A start at xA0 = 0 with speed vA, and B start at xB0 = −g (a gap g behind A) with speed vB. Their positions are xA(t) = vAt and xB(t) = −g + vBt. They meet when these are equal:

t* = g / (vB − vA)

This only gives a sensible future meeting time when vB > vA (B has to be faster than A to close a gap behind them at all) — if vB ≤ vA, B never catches up, the gap only grows or stays exactly the same forever. Notice the head start g sits on top: double the head start and you exactly double the time needed to close it, for a fixed speed difference.

Widget 3 — Relative Velocity Explorer

Velocity only makes sense relative to something. A boat "aimed" straight across a river isn't actually moving straight across the ground, because the water it's moving through is itself moving. The same addition — your velocity relative to a medium, plus that medium's velocity relative to the ground — also explains why a headwind slows a plane's ground speed without slowing it through the air at all.

River width30 m
Current speed1.5 m/s
Boat speed (relative to water)3.0 m/s
Boat heading (0° = straight across, − = angled upstream)0°
Boat, relative to water—
Current, relative to ground—
Boat, relative to ground—
Crossing time—
Downstream drift—
For math enthusiasts: why "aim across" doesn't mean "go across"

The boat's velocity relative to the ground is the vector sum of its velocity relative to the water and the water's velocity relative to the ground (the current) — the same vector addition from the toolkit. With the across-river direction as y and the downstream direction as x, and heading angle θ measured from straight-across:

vground,x = vboatsin(θ) + vcurrent    vground,y = vboatcos(θ)

Crossing time only depends on the across-river component: T = width / vground,y. Downstream drift is then vground,x·T. Aiming straight across (θ = 0) does not zero the drift — it zeroes the boat's own contribution to sideways motion, but the current keeps pushing regardless. To land exactly opposite your start, you have to aim upstream by just enough that vboatsin(θ) = −vcurrent — which is only possible at all if the boat is at least as fast as the current.

Try it at home: video analysis

  1. Record a toy car rolling across a flat floor at a steady push, or film someone walking at a steady pace across a room — steady pace is the whole point, so avoid speeding up or slowing down mid-clip.
  2. Step through the video frame by frame (most phone video is 30 frames per second, so each frame is 1/30 s) and mark the object's position in each frame using a fixed reference (floor tiles, a tape measure taped down beforehand).
  3. Plot position against time by hand or in a spreadsheet. If the pace was genuinely steady, the points should sit close to a straight line.
  4. Fit a straight line and read its slope — that's your measured velocity. Compare it to a stopwatch-and-tape-measure estimate (total distance ÷ total time) — they should agree, since average velocity over the whole trip is exactly what that stopwatch method measures.

One more application worth knowing is already built: walking on a moving walkway is exactly the reference-frame problem from the toolkit's Reference Frames tab — go there to play with it directly.

Constant Acceleration

Make a prediction first: a car goes twice as fast as another identical car with the same brakes. When both slam the brakes, does the faster car need twice the distance to stop, or more than twice? Most drivers badly underestimate this one — Widget 2 below will show you the real number.

u — initial velocity (at t = 0)
v — velocity at time t
a — acceleration (constant): how much velocity changes per second
t — elapsed time
s — displacement over that time

v = u + at     s = ut + ½at²     v² = u² + 2as

For math enthusiasts: where all three equations come from

v = u + at is just the definition of acceleration rearranged: a = (v − u)/t. On a velocity-time graph this is the whole story: a is the slope of the line, because velocity increases by the same amount, a, every single second.

s = ut + ½at² comes from "displacement = area under the velocity-time graph." That area is a trapezoid: a rectangle of height u and width t (area ut), plus a triangle on top with base t and height (v − u) = at (area ½t·at = ½at²). Add them: s = ut + ½at².

v² = u² + 2as eliminates t entirely — useful whenever a problem never tells you how much time passed (braking distance is the classic example). It falls out of substituting t = (v − u)/a from the first equation into the second one and simplifying.

Widget 1 — Motion Graph Explorer

Set an initial velocity and an acceleration and press play. Notice the position-time graph is now a curve, not a straight line — its slope (the instantaneous velocity) keeps changing, which is exactly what "accelerating" means. The velocity-time graph is still a straight line, just a tilted one; the shaded trapezoid under it is the displacement.

Track

Position vs. time — s(t) = ut + ½at²

t (s) s (m)

Velocity vs. time — slope = a, shaded area = s

t (s) v (m/s)
Initial velocity, u0.0 m/s
Acceleration, a2.0 m/s²
Elapsed time, t0.0 s
Velocity, v(t)0.0 m/s
Displacement, s(t)0.0 m

Widget 2 — Braking Distance & Reaction Time

Total stopping distance has two completely different parts: how far you travel before you even start braking (reaction distance — still at full speed, constant velocity), and how far you travel while braking (braking distance — constant deceleration down to zero). Try the reaction-time tester below to plug in your own actual reaction time instead of guessing it.

Initial speed, v₀20 m/s
Reaction time1.5 s

Road condition (braking deceleration)

Braking deceleration8.0 m/s²
Reaction distance—
Braking distance—
Total stopping distance—
For math enthusiasts: why doubling your speed more than doubles your stopping distance

Reaction distance is constant-velocity motion: dreact = v₀·tR — that part scales linearly with speed. But braking distance comes from v² = u² + 2as with final velocity 0:

dbrake = v₀² / (2a)

That's v₀ squared. Double your speed and reaction distance only doubles, but braking distance quadruples. Triple your speed and braking distance is nine times longer. This is the single biggest reason speed limits matter more on the highway than they seem to at a glance — the danger doesn't scale with speed, it scales with speed squared.

Widget 3 — Ramp Experiment

Release a cart from rest at the top of a frictionless ramp. Predict how long it takes to reach the bottom, then time it yourself with the start/stop buttons and see how close your measurement gets to the true physics.

Ramp angle, θ15°
Ramp length2.0 m
True acceleration, a = g·sin(θ)—
True time to bottom—
Your measured time—
Acceleration from your measurement—
For math enthusiasts: where g·sin(θ) comes from

Gravity pulls straight down with acceleration g, but the cart is constrained to move along the ramp's surface. Decomposing g into components parallel and perpendicular to the ramp (exactly the component decomposition from the toolkit) gives a component gsin(θ) pointing down the slope and a component gcos(θ) pressing into the ramp (which the ramp's surface cancels out — the cart doesn't sink into it). Only the along-ramp piece accelerates the cart, so a = gsin(θ). A shallower ramp (small θ) means a gentler, easier-to-measure acceleration — which is exactly why the real experiment below asks for a shallow ramp rather than a steep one.

Try it for real: ramp and stopwatch

  1. Prop up a board or track at a shallow, measured angle (5–15° is easiest to time accurately) and mark a fixed distance down it.
  2. Release a cart, marble, or ball from rest at the top and time how long it takes to reach your mark, using a stopwatch or your phone.
  3. Run it several times and average the times — reaction time on the stopwatch button adds random error you can average away.
  4. Compute acceleration from your average time using a = 2s/t² (from s = ut + ½at² with u = 0), and compare it to the predicted gsin(θ) using your ramp's actual angle.
  5. They usually won't match perfectly — the gap is real friction and rolling resistance, which this idealized model leaves out on purpose (that's next section's problem to solve).

Free Fall

Make a prediction first: drop a bowling ball and a tennis ball from the same height at the same instant, ignoring air. Which lands first? Now picture a feather and a hammer dropped the same way, this time with air around them, on Earth — and then on the Moon, where there's no air at all. (That second version isn't hypothetical: Apollo 15's commander did exactly this on live TV in 1971. Widget 2 below lets you re-run it.)

g — gravitational acceleration near Earth's surface, ≈ 9.8 m/s², always pointing down
y — height above the ground; y₀ — starting height
v — vertical velocity (positive = upward); v₀ — starting vertical velocity
t — time since release

Free fall is just constant acceleration with a = −g always — the same v = u + at and s = ut + ½at² from the last tab, specialized to one direction. What makes it worth its own tab: g doesn't depend on the object's mass at all, which is the single most counterintuitive fact in this whole section.

For math enthusiasts: why mass drops out of free fall entirely

You'll see the force explanation properly in the Newton's Laws section (heavier objects need proportionally more force to accelerate them, and gravity conveniently supplies proportionally more force to heavier objects — the two proportionalities cancel). For now, purely as a fact about motion: two objects released from the same height at the same instant, in a vacuum, hit the ground at the same instant, regardless of how much either one weighs. Air resistance is a completely separate effect — it depends on shape and speed, not weight directly — and it's the only reason a feather seems to disobey this rule in everyday experience.

Widget 1 — Free-Fall Graph Simulator

Drop something from a height, or throw it straight up or down first. All three graphs share the same clock: watch how the position curve's steepness (its slope) always matches the velocity graph's current height, while the acceleration graph just... doesn't move. That flat line is "constant acceleration."

Vertical track

Height vs. time — y(t) = y₀ + v₀t − ½gt²

Velocity vs. time — slope = −g

Acceleration vs. time — always flat

Starting height, y₀20 m
Starting velocity, v₀ (+ up, − down)0 m/s
Gravity, g9.8 m/s²
Elapsed time, t0.0 s
Height, y(t)20.0 m
Velocity, v(t)0.0 m/s
Time to land—

Widget 2 — Drop Comparison & Terminal Velocity

Two objects fall from the same height. One is compact and dense (low air resistance); the other is light and spread out (high air resistance) — think a marble versus a sheet of paper. Flip on "vacuum" and watch every difference between them disappear, exactly like it did on the Moon.

Drop height60 m
High-drag object's drag coefficient0.08
Compact object: landing time—
High-drag object: landing time—
High-drag terminal velocity—
For math enthusiasts: where terminal velocity comes from

Using the same quadratic-drag model as the projectile tab, but purely vertical: acceleration while falling is a = g − b·s², where s is the falling speed and b bundles up the object's drag coefficient, cross-sectional area, air density, and mass into one number. As s grows, the drag term grows too (it's squared!) until it exactly cancels g — at that point acceleration is zero and speed stops changing. Setting a = 0:

sterminal = √(g / b)

A larger b (more drag relative to weight — a wider, lighter object) gives a lower terminal velocity, which is exactly why a sheet of paper drifts down slowly while a marble made of the same material would thud to the floor almost as fast as it would in vacuum.

Widget 3 — Ruler-Drop Reaction Time Test

This is the actual classroom technique for measuring reaction time without a stopwatch: someone releases a ruler without warning, you catch it as fast as you can, and however far it fell tells you your reaction time — because for a falling object, distance and time are locked together by d = ½gt².

✋

Distance fallen before you caught it—
Your estimated reaction time—

Try it for real: ruler drop and paper vs. coin

  1. Have a friend hold a ruler vertically with the 0 cm mark at the bottom, your fingers open right at that mark, not touching it.
  2. Without any countdown, they let go; you catch it as fast as you can and read whatever mark lines up with your fingers.
  3. Convert that distance to reaction time with t = √(2d/g) — typical human reaction times land around 0.15–0.3 s (15–30 cm).
  4. Separately: drop a flat sheet of paper and a coin side by side. The coin wins easily. Now crumple the paper into a tight ball and race them again — same mass, same material, dramatically closer finish, because you changed its air resistance, not its weight.

Projectile Motion

Make a prediction first: if you throw a ball at 45° and then throw the same ball, just as hard, at 30°, which one lands farther away? Which one lands first? Most people guess wrong on at least one of those — build the explorer below and check yourself before reading on.

The core idea behind everything on this page: gravity only pulls down. It never pushes sideways. So a launched object's horizontal motion and vertical motion don't interfere with each other at all — you can work out each one separately, using exactly the tools from the toolkit (components) and constant-velocity / constant-acceleration kinematics, and then just recombine them.

x(t), y(t) — horizontal and vertical position at time t
v₀ — launch speed
θ (theta) — launch angle above horizontal
y₀ — launch height above the ground
g — gravitational acceleration (9.8 m/s² on Earth)
R — range (horizontal distance travelled when it lands)
H — maximum height reached
T — time of flight (total time in the air)

x(t) = v₀cos(θ) · t     y(t) = y₀ + v₀sin(θ) · t − ½gt²

For math enthusiasts: where those two equations come from

Decompose the launch velocity into horizontal and vertical parts: vx = v₀cos(θ) and vy = v₀sin(θ). Horizontally there is no acceleration at all (nothing is pushing the object sideways), so that's just constant-velocity motion: x(t) = x₀ + vxt. Vertically, the only acceleration is gravity, a = −g, so that's constant-acceleration motion: y(t) = y₀ + vyt − ½gt². Substituting vx and vy gives exactly the two boxed equations above. Every other projectile formula (range, height, time of flight) is just algebra performed on these two.

Widget 1 — Projectile Motion Explorer

Adjust launch speed, angle, launch height, and gravity, and watch the range, max height, and time of flight respond. The preset buttons load realistic numbers for a few everyday throws — try "Clear the wall" to turn this into a mini free-kick problem.

Launch speed, v₀15 m/s
Launch angle, θ45°
Launch height, y₀0.0 m
Gravity, g9.8 m/s²
Range, R—
Max height, H—
Time of flight, T—
For math enthusiasts: deriving range, max height, and time of flight

Time of flight — the object lands when y(t) = 0. That's a quadratic in t: −½gt² + v₀sin(θ)t + y₀ = 0. The quadratic formula, keeping the positive root, gives:

T = [ v₀sin(θ) + √( (v₀sin(θ))² + 2gy₀ ) ] / g

When the launch height y₀ = 0, that simplifies to the familiar T = 2v₀sin(θ)/g.

Max height — the object stops rising exactly when its vertical velocity hits zero: vy(t) = v₀sin(θ) − gt = 0, so that happens at th = v₀sin(θ)/g. Plugging that back into y(t) gives:

H = y₀ + (v₀sin(θ))² / (2g)

Range is just R = x(T) = v₀cos(θ)·T. When y₀ = 0, substituting the simple form of T and using the identity 2sin(θ)cos(θ) = sin(2θ) gives the well-known result R = v₀²sin(2θ)/g — which is maximized at exactly θ = 45°, and gives the same range for θ and 90° − θ (a 30° throw and a 60° throw, at the same speed, land in the same spot — just at very different times and heights). Try it on the explorer above.

For math enthusiasts: what air resistance actually changes

The dashed red curve uses a simple drag model where the air pushes back on the object with a force proportional to v² (speed squared), always pointing opposite to the direction of motion. Written as acceleration components, with v = √(vx² + vy²) and drag-strength constant b (folding the object's drag coefficient, cross-sectional area, air density, and mass into one number):

ax = −b·v·vx    ay = −g − b·v·vy

There's no clean formula for x(t) and y(t) anymore — the widget instead steps forward in small time increments Δt (about 20 milliseconds), recomputing the acceleration and updating the velocity and position each step. This is called numerical integration (specifically, the simplest version, Euler's method), and it's the same basic idea used for almost any physics simulation that doesn't have a tidy closed-form answer.

One genuinely surprising consequence: with drag, the range-maximizing angle is no longer 45° — it drops, often into the 30–40° range, because a flatter shot spends less total time fighting air resistance. Turn drag on and slide θ around 45° to see the ideal (blue) and drag (red) curves disagree about where the optimum is.

Widget 2 — Target Challenge

Speed is fixed. Your only job is to find the angle that lands exactly on the target. There are usually two different angles that work for any given speed and distance — see if you can find both.

Launch speed, v₀ (fixed for this round)18 m/s
Launch angle, θ45°
Target distance—
Predicted landing spot—
Result—
For math enthusiasts: why two angles always work

With y₀ = 0, range is R = v₀²sin(2θ)/g. Because sin(2θ) = sin(180° − 2θ) = sin(2(90° − θ)), swapping θ for 90° − θ leaves R completely unchanged. A 20° throw and a 70° throw at the same speed land in the same place — the low, flat one gets there quickly; the high, lobbed one takes much longer and spends far more time in the air. There is exactly one exception: θ = 45° is its own pair (90° − 45° = 45°), which is also why it's the single angle that maximizes range.

Try it at home: the water-stream experiment

  1. Turn on a garden hose or a water fountain at a fixed pressure so the arc is steady.
  2. Stand to the side and take a photo of the water arc against a plain background, with something of known length (a yardstick, a person of known height) in the same frame for scale.
  3. Import the photo into any image editor or plotting tool and mark several (x, y) points along the visible arc.
  4. Fit those points to y = y₀ + tan(θ)·x − [g / (2v₀²cos²θ)]·x² (the same equation as above, rewritten with time eliminated) and compare the fitted θ and v₀ to what you'd estimate by eye.
  5. Does the real arc match a parabola well, or does it look visibly "steeper on the way down" — a sign that air resistance mattered more than the ideal model assumes?

Try it at home: sports-video analysis

  1. Find (or record) slow-motion footage of a thrown, kicked, or shot ball — a basketball free throw is a good, simple choice.
  2. Step through the video frame by frame and mark the ball's pixel position in each frame, along with the known frame rate (e.g. 30 or 60 frames per second).
  3. Convert pixel positions to real distances using a known reference length visible in the shot (the height of the hoop, the width of the court's key, etc.).
  4. Plot vertical position against horizontal position — it should trace a parabola — and separately plot vertical position against time, which should look like the constant-acceleration curve from the "Constant Acceleration" tab.
  5. Estimate the launch angle and speed from the first couple of frames, then check whether the Projectile-Motion Explorer above (with those numbers) predicts the same range you measured.

Widget 3 — Interception Lab: leading a moving target

Projectile motion gets genuinely interesting once the target isn't sitting still. A quarterback has to throw ahead of a running receiver; a dog has to run to where a thrown ball is going to be, not where it is right now; two cars approaching the same intersection have to (implicitly) solve the same kind of problem to avoid meeting at the same point at the same time. All of these are the same question: given two things in motion, is there a time t at which they occupy the same place?

Car A (blue) — moves along +x

Start position (x, y)(−30, 0) m
Speed10 m/s

Car B (orange)

Start position (x, y)(0, −30) m
Heading (from +x axis)90°
Speed10 m/s
Closest approach—
Time of closest approach—
Verdict—
For math enthusiasts: solving for the closest approach

Write each car's position as a straight line in time: pA(t) = pA0 + vAt, and likewise for car B. Their separation is r(t) = pB(t) − pA(t) = Δp0 + Δv·t, where Δp0 and Δv are the initial separation and relative velocity (both vectors). The squared distance |r(t)|² is a simple upward parabola in t; calculus (or completing the square) says its minimum is at:

t* = −(Δp0 · Δv) / |Δv|²

(a dot product on top, divided by the squared length of the relative velocity). Plugging t* back into r(t) gives the closest-approach distance. If that distance is smaller than the sum of both cars' "radii," they collide before t*; if t* comes out negative, their closest approach already happened in the past and they're moving apart now.

Widget 4 — Extending to 3D: intercepting a maneuvering target

A real interception problem — a surface-to-air missile meeting an incoming aircraft, or even just a well-thrown pass to a receiver cutting across the field rather than running straight — isn't confined to one vertical plane. The interceptor has to match the target's downrange position and its sideways ("crossrange") position and its altitude, all at the same instant. That means aiming with two angles at once: an elevation angle (up/down, same as θ above) and an azimuth angle (left/right).

θ — interceptor's elevation angle (up from horizontal)
φ (phi) — interceptor's azimuth angle (sideways lead)
x — downrange axis (toward the target)
z — crossrange axis (sideways)
y — altitude
Tc — the intercept time you're aiming for
For math enthusiasts: the 3D equations

The interceptor's launch speed splits three ways instead of two. First, elevation splits it into a vertical part and a horizontal part; then azimuth splits that horizontal part into downrange and crossrange:

vx = v₀cos(θ)cos(φ)    vz = v₀cos(θ)sin(φ)    vy = v₀sin(θ)

Gravity still only acts on y, so: x(t) = vxt, z(t) = vzt, y(t) = vyt − ½gt². The target, moving at constant velocity and (for simplicity) constant altitude, has its own xt(t), zt(t), and fixed yt. A perfect intercept at your chosen time Tc means all three coordinates match simultaneously — three equations. With v₀, θ, and φ as your three unknowns (for a chosen Tc), this is, in general, exactly solvable — but doing it by algebra is unpleasant, which is exactly why the widget below lets you solve it by feel instead, the same way a fire-control computer solves it iteratively rather than symbolically.

Tune the target's motion, then tune your interceptor's v₀, θ, φ, and your chosen intercept time Tc until the live miss-distance below reads close to zero in both views at once — that's the hard part; a fix in the top-down view alone (matching downrange + crossrange) says nothing about whether you'll be at the right altitude.

Top-down view (downrange × crossrange)

Side view (downrange × altitude)

Target

Starting downrange distance35 m
Starting crossrange offset0 m
Altitude (constant)15 m
Speed10 m/s
Heading (toward you = 180°)180°

Your interceptor

Launch speed, v₀30 m/s
Elevation, θ30°
Azimuth, φ0°
Intercept time, T꜀2.0 s
Target position at T꜀—
Interceptor position at T꜀—
3D miss distance—
Verdict—

Relative Motion

Make a prediction first: two trains pass each other on parallel tracks, each doing 60 km/h in opposite directions. From a platform, each train looks like it's doing 60 km/h. From inside one train, looking at the other — is it also 60 km/h, or does it look faster?

vA, vB — velocities of A and B, both measured relative to the ground
vB/A — velocity of B relative to A: what someone riding along with A would see B doing
r — a position vector; Δr — a displacement

vB/A = vB − vA — plain vector subtraction, the same operation from the toolkit. Drag both velocity vectors below and watch the relative one update live.

Widget — Two-Object Relative-Velocity Explorer

Vectors A and B are two objects' velocities, both measured from the ground. The dashed segment from A's tip to B's tip is B's velocity relative to A — slide it back to the origin (the solid green arrow) and you get the same vector. Below, watch the same two objects' motion play out on a track twice: once from the ground, once from inside object A.

vA—
vB—
vB/A = vB − vA—

Ground frame — both A and B move (horizontal component only, for this track view)

A's frame — A stays put, B moves at vB/A

Elapsed time0.0 s
For math enthusiasts: why displacement depends on your frame but doesn't have to

If rA(t) and rB(t) are positions measured from the ground, B's position as seen from A is rB(t) − rA(t). Differentiate both sides with respect to time and you get exactly vB/A = vB − vA — velocities subtract the same way positions do, at every instant, regardless of where the origin is. That's why the vector diagram above doesn't care where you drop the vectors on the grid: only the difference between the two arrowheads matters, never their absolute position.

For the passing-trains prediction: if vA = +60 km/h and vB = −60 km/h (opposite directions), then vB/A = −60 − 60 = −120 km/h. From the platform each train is doing 60; from inside either train, the other one blows past at 120 — closing speeds add, they don't cancel.

Two applications are already fully built elsewhere rather than duplicated here: boats crossing a river and aircraft flying with or against the wind are exactly the river-crossing and headwind/tailwind modes in the Constant Velocity tab's Relative Velocity Explorer — go there for those two directly.