Position changes with velocity; velocity changes with force.
This is the entire physics engine in two lines: vel += (force / mass) * dt then pos += vel * dt. Each frame, we nudge velocity by the acceleration (force divided by mass), then nudge position by the new velocity. This is Euler integration — the simplest possible numerical method.
It is not perfectly accurate. With large dt, the trajectory drifts from the true answer. But for games and interactive simulations, it works beautifully when dt is small (60 fps or better).
Launch a projectile.
Below: force = (0, -9.8) — gravity. Initial velocity = (3, 5). Press Play and watch the parabolic arc. This is the same math a cannon uses.
What's the trajectory shape?
A constant downward force plus an initial velocity at an angle produces what curve?
Reveal
A parabola. This is projectile motion — the same shape whether it is a cannon ball, a basketball, or a water fountain. x grows linearly with time, y follows a quadratic.
Watch Euler error grow with large dt.
Increase dt from 0.016 to 0.1 or 0.2 using the slider. The trail becomes jagged and the particle overshoots the true parabola. Reduce dt to see it converge back. This is why physics engines run at high tick rates.
Hit the ring.
Challenge: The gold ring below is at the apex of a parabolic arc. Adjust the playground (reset and re-play with different mental models of the initial conditions) until the particle passes through the ring.
You understand Euler integration — the computational heart of every physics engine. Position and velocity, nudged forward each frame. Mark complete.