Curvilinear Motion
Curvilinear motion is motion along a curved path, described by giving each coordinate as a function of time. Differentiating each coordinate gives the velocity and acceleration vectors, which tell you not only how fast something moves but also in which direction and how sharply it turns. This is the mathematics behind every projectile, orbit and racing line in a game.
Position, velocity, acceleration as vectors
A moving point in the plane has position . Differentiate component by component:
The velocity vector always points along the path, in the direction of motion. The acceleration vector points towards the inside of the curve whenever the path bends.
Projectile motion
A ball is launched from the origin at speed and angle , with gravity pulling down and no air resistance:
The horizontal velocity never changes; only the vertical one does. Setting gives the flight time and the range , largest at .
import sympy as sp
t, v0, th, g = sp.symbols('t v0 theta g', positive=True)
r = sp.Matrix([v0 * sp.cos(th) * t, v0 * sp.sin(th) * t - g * t**2 / 2])
v = r.diff(t)
a = v.diff(t)
print("velocity :", list(v))
print("acceleration:", list(a))
T = sp.solve(r[1], t)[0]
print("flight time :", T)
print("range :", sp.simplify(r[0].subs(t, T)))velocity : [v0*cos(theta), -g*t + v0*sin(theta)]
acceleration: [0, -g]
flight time : 2*v0*sin(theta)/g
range : v0**2*sin(2*theta)/g
SymPy writes the range as v0**2*sin(2*theta)/g after simplifying .
Circular motion
A point moving round a circle of radius with constant angular speed :
Even at constant speed there is an acceleration, of size , pointing at the centre: the centripetal acceleration. Changing direction is acceleration.
Numeric evidence: differentiating sampled positions
A game records an object's position every frame. Finite differences recover velocity and acceleration, here for circular motion with , :
import numpy as np
R, w, dt = 2.0, 3.0, 1 / 60
t = np.arange(0, 2, dt)
pos = np.stack([R * np.cos(w * t), R * np.sin(w * t)], axis=1)
vel = (pos[2:] - pos[:-2]) / (2 * dt) # central differences
acc = (pos[2:] - 2 * pos[1:-1] + pos[:-2]) / dt**2
speed = np.linalg.norm(vel, axis=1)
acc_mag = np.linalg.norm(acc, axis=1)
print(f"speed: {speed.min():.4f} .. {speed.max():.4f} exact R*w = {R * w}")
print(f"|accel|: {acc_mag.min():.4f} .. {acc_mag.max():.4f} exact R*w^2 = {R * w * w}")
dots = np.sum(vel * pos[1:-1], axis=1)
print(f"max |v · r|: {np.abs(dots).max():.2e} (velocity is perpendicular to radius)")speed: 5.9975 .. 5.9975 exact R*w = 6.0
|accel|: 17.9963 .. 17.9963 exact R*w^2 = 18.0
max |v · r|: 2.04e-14 (velocity is perpendicular to radius)
The measured speed and acceleration are about 0.04% low, which is the -sized error of the central differences with . The dot product is zero up to rounding: the velocity is tangent to the circle.
Tangential and normal acceleration
Acceleration splits into a part along the velocity, which changes the speed, and a part across it, which changes the direction:
For a car on a race track, is the throttle and brakes, and is the cornering grip. Tight corners (large curvature ) at high speed need a lot of grip, since grows with the square of the speed.
import numpy as np
# projectile with v0 = 20 m/s at 60 degrees, g = 9.8
v0, th, g = 20.0, np.radians(60), 9.8
for t in [0.0, 1.0, v0 * np.sin(th) / g, 3.0]:
v = np.array([v0 * np.cos(th), v0 * np.sin(th) - g * t])
a = np.array([0.0, -g])
aT = v @ a / np.linalg.norm(v)
aN = np.sqrt(a @ a - aT**2)
print(f"t = {t:.3f} speed {np.linalg.norm(v):6.3f} a_T {aT:+7.3f} a_N {aN:6.3f}")t = 0.000 speed 20.000 a_T -8.487 a_N 4.900
t = 1.000 speed 12.512 a_T -5.890 a_N 7.832
t = 1.767 speed 10.000 a_T +0.000 a_N 9.800
t = 3.000 speed 15.682 a_T +7.549 a_N 6.249
At the top of the arc () the velocity is horizontal, so all of gravity acts as normal acceleration and : the speed is at its minimum there.
In software
- Game projectiles and aiming: grenades, arrows and basketball shots use exactly , . Solving for gives the aim angle an AI needs; drawing for many gives the trajectory preview line. Physics engines integrate the same equations step by step (integrators, Physics Integration in Game Loops).
- Facing the direction of motion: to point a missile or car along its path, rotate it to the velocity direction
atan2(vy, vx)(atan2). - Cameras and rails: cameras along splines and roller coasters use for orientation and to limit accelerations that feel unpleasant. The full 3D version, with arc length and curvature, is in Motion in Space and Parametric and Bézier Curves.
Exercises
Exercise 1: Velocity and speed
For , find the velocity, speed and acceleration at .
Answer
, speed , .
Solution
Exercise 2: Highest point
A ball is thrown from the ground at , , . When does it reach its highest point, and how high is it?
Answer
At , height .
Solution
Exercise 3: Centripetal acceleration
A car takes a curve of radius 50 m at 72 km/h. What is its centripetal acceleration, and how many g is that?
Answer
, about .
Solution
Exercise 4: Aim a shot
A turret fires at . Find both launch angles that hit a target on flat ground 60 m away (), using .
Answer
About and .
Solution
import math
s = 60 * 9.8 / 30**2
low = math.degrees(math.asin(s)) / 2
print(round(low, 1), round(90 - low, 1))20.4 69.6
The low shot arrives sooner; the high "lob" can clear obstacles. Games often let AI pick between them.
Test yourself
An object moves in a circle at constant speed. Its acceleration is …
- zero
- tangent to the circle
- pointed towards the centre
- pointed away from the centre
In ideal projectile motion, which velocity component stays constant?
- The vertical one
- Both
- The horizontal one
- Neither
. What is the speed?
- 1
- 3
- 9
- It depends on