Motion in Space: Velocity and Acceleration
When is the position of a moving object, its derivatives are velocity and acceleration, and integrating them back recovers the motion from forces. This lesson connects the vector calculus of the previous lessons to Newton's second law: projectiles, splitting acceleration into a part along the path and a part toward the bend, and the derivation of Kepler's law of equal areas. It ends with what happens when a computer integrates the motion step by step.
For a gentle first pass, see Motion in Space and Curvilinear Motion.
Velocity, speed and acceleration
For a particle with position :
| Quantity | Definition | Meaning |
|---|---|---|
| velocity | points along the path (tangent) | |
| speed | rate of change of distance travelled | |
| acceleration | rate of change of velocity, in direction and size |
The reverse direction uses the integrals of the previous lesson:
Newton's second law says . Given the force, two integrations and two initial vectors (position and velocity) determine the motion. Example: uniform circular motion has and : the acceleration has size and points to the centre, so keeping a mass on the circle needs the centripetal force .
import sympy as sp
t = sp.symbols("t")
a = sp.Matrix([6 * t, 2, sp.exp(-t)]) # acceleration
v0 = sp.Matrix([1, 0, -1]) # v(0)
r0 = sp.Matrix([0, 1, 2]) # r(0)
v = v0 + a.applyfunc(lambda c: sp.integrate(c, (t, 0, t)))
r = r0 + v.applyfunc(lambda c: sp.integrate(c, (t, 0, t)))
print("v(t) =", list(v))
print("r(t) =", list(r))
print("r(1) =", [round(float(c), 4) for c in r.subs(t, 1)],
" speed at t=1:", round(float(v.subs(t, 1).norm()), 4))v(t) = [3*t**2 + 1, 2*t, -exp(-t)]
r(t) = [t**3 + t, t**2 + 1, 1 + exp(-t)]
r(1) = [2.0, 2.0, 1.3679] speed at t=1: 4.4872
The height tends to 1 as : the velocity's third component, , dies out, so the particle sinks by a total of only 1 unit in , however long it moves.
Projectiles
Near the Earth's surface, ignoring air resistance, the only force is gravity: in a vertical plane. Launching from height with speed at angle above the horizontal:
| Quantity | Formula (, level ground) |
|---|---|
| time of flight | |
| maximum height | |
| range | , largest at |
From a height , set and take the positive root of the quadratic; the best angle is then a little less than 45°.
Tangential and normal components
Write for speed. Since , differentiating with the product rule and using gives
So acceleration always lies in the osculating plane: it has no binormal component. The tangential part changes the speed (pressing the accelerator or the brake); the normal part bends the path (turning the wheel), and it grows with the square of the speed. The formula for comes from ; the formula for from . Since , .
import numpy as np
def components(r1, r2):
"""a_T and a_N from velocity r1 and acceleration r2."""
speed = np.linalg.norm(r1)
aT = float(np.dot(r1, r2) / speed)
aN = float(np.linalg.norm(np.cross(r1, r2)) / speed)
return aT, aN
# a car entering a bend: r(t) = <20t, 0.5t^3, 0>, so
for t in [0.0, 1.0, 2.0]:
r1 = np.array([20.0, 1.5 * t**2, 0.0])
r2 = np.array([0.0, 3.0 * t, 0.0])
aT, aN = components(r1, r2)
print(f"t={t}: speed {np.linalg.norm(r1):7.4f} a_T {aT:.4f} a_N {aN:.4f}"
f" check {aT**2 + aN**2:.4f} = {np.dot(r2, r2):.4f}")t=0.0: speed 20.0000 a_T 0.0000 a_N 0.0000 check 0.0000 = 0.0000
t=1.0: speed 20.0562 a_T 0.2244 a_N 2.9916 check 9.0000 = 9.0000
t=2.0: speed 20.8806 a_T 1.7241 a_N 5.7470 check 36.0000 = 36.0000
Almost all of the acceleration is sideways (normal), the part passengers feel as being pushed toward the outside of the bend.
Kepler's second law
Newton showed that Kepler's laws of planetary motion follow from with gravity , a central force (it points along ). The key step is short. Let (angular momentum per unit mass):
because and is parallel to . So is a constant vector, which gives two facts:
- is always perpendicular to , so the orbit lies in a fixed plane.
- In time the radius vector sweeps a thin triangle of area , so is constant: equal areas in equal times (Kepler's second law). The planet moves fastest at its closest point.
Further work with and gives the first law (the orbit is a conic, see Conic Sections in Polar Coordinates) and the third law ( proportional to ).
Integrating the motion numerically
A game or simulation cannot integrate gravity in closed form for many bodies; it steps and forward by a time step . How the step is written matters. Explicit Euler updates position with the old velocity; semi-implicit (symplectic) Euler updates velocity first and moves with the new one.
import numpy as np
def accel(p): # GM = 1
return -p / np.linalg.norm(p) ** 3
def run(method, dt=0.01, steps=3000):
p, v = np.array([1.0, 0.0]), np.array([0.0, 1.2])
for _ in range(steps):
if method == "explicit":
p, v = p + dt * v, v + dt * accel(p)
else: # semi-implicit
v = v + dt * accel(p)
p = p + dt * v
h = p[0] * v[1] - p[1] * v[0] # angular momentum (z-component)
E = 0.5 * v @ v - 1 / np.linalg.norm(p) # energy
return float(h), float(E)
print("start h = 1.2000 E = -0.2800")
for m in ["explicit", "semi-implicit"]:
h, E = run(m)
print(f"{m:<14} h = {h:.4f} E = {E:.4f}")start h = 1.2000 E = -0.2800
explicit h = 1.2650 E = -0.2424
semi-implicit h = 1.2000 E = -0.2800
Explicit Euler's orbit gains energy and angular momentum: each step adds , so the planet slowly spirals outward. Semi-implicit Euler keeps exactly (the position update uses the new velocity, and ), and its energy only oscillates slightly without drifting. This is why game engines use semi-implicit Euler or Verlet; see Integrators.
In software
- Ballistics in games. Aiming a turret or AI throw solves the projectile equations for given a target; the quadratic in has two solutions (high lob and flat shot) or none (out of range).
- Ride and vehicle comfort. Roller-coaster and racing-line tools monitor along the track; designers cap it (a few g) and keep its rate of change (jerk) small, which is why curvature should vary smoothly.
- Camera motion. Camera rigs decompose acceleration the same way: is the "zoom forward" feeling, the swing. Smoothing avoids nausea in VR.
- Orbital mechanics. Space games and satellite software rely on conserved quantities (, energy) both for physics and as checks that the integrator is not drifting.
Exercises
Exercise 1: From acceleration to position
A particle has , and . Find , and the speed at .
Answer
; ; speed .
Solution
Exercise 2: A throw from a height (code)
A ball is thrown from 2 m above level ground at 20 m/s, 30° above horizontal, with . Find the time of flight, the range and the maximum height.
Answer
Time , range , maximum height .
Solution
import math
vx, vy, h, g = 20 * math.cos(math.radians(30)), 20 * math.sin(math.radians(30)), 2.0, 9.8
T = (vy + math.sqrt(vy**2 + 2 * g * h)) / g
print(round(T, 4), round(vx * T, 2), round(h + vy**2 / (2 * g), 3))2.2243 38.53 7.102
Exercise 3: Tangential and normal components
For , find and at .
Answer
, .
Solution
Exercise 4: Braking in a bend
A car on a circular bend of radius 50 m travels at 20 m/s and brakes at . What is the size of its acceleration, and what minimum friction coefficient (with , friction must supply ) keeps it from sliding?
Answer
; .
Solution
Braking adds to the demand on the tyres; that is why drivers are taught to brake before the bend, not in it.
Test yourself
In , what does the normal component equal?
- , the rate of change of speed
- , curvature times speed squared
- always
- 0 for every curve
Why is the angular momentum constant under a central force?
- Because the speed is constant
- Because the orbit is a circle
- Because , and both terms vanish when is parallel to
- Because energy is conserved
Which simple integrator keeps the angular momentum of an orbit exactly constant (up to rounding)?
- Explicit Euler
- Semi-implicit Euler (update , then move with the new )
- Neither can
- Only RK4