<CS> Learning

Motion Graphs Camera Lab

Walk, record and plot displacement, velocity and acceleration live

Live graph

Displacement–time graph

Distance from camera— 
Velocity— 
Acceleration— 

01How the camera measures distance

A camera behaves like a pinhole: the further away an object is, the smaller its image. By similar triangles, the image width is proportional to 1 ÷ distance. Image area is proportional to 1 ÷ distance², so the square root of the area works too.

d = k ÷ √A

Here A is the number of pixels the coloured sheet covers. Calibrating at a measured distance d0 fixes the constant: k = d0√A0.

Far from the camera the sheet covers few pixels, so a single pixel of error matters more. That is why readings are noisier beyond about 3 m.

02From displacement to velocity and acceleration

Velocity is the gradient of the displacement–time graph. Acceleration is the gradient of the velocity–time graph.

v = ds⁄dt,   a = dv⁄dt = d²s⁄dt²

Each gradient comes from a curve of best fit through the readings either side of that moment. Differentiating amplifies measurement noise, so the a–t graph is the most jagged. More smoothing uses a wider window. It reduces noise but rounds off sudden changes and delays the live graph slightly.

Hover over a recorded graph, or focus it and use the arrow keys. The s–t graph then shows a tangent. The v–t and a–t graphs show the area under the line, which gives the change in displacement or velocity.

03Setting up the room
  • Use a brightly coloured sheet. Bright pink, green or orange works best; white paper is easily confused with walls.
  • Remove anything else of that colour from the shot, including clothing.
  • Place the camera at chest height with a clear path from about 0.6 m to 3 m.
  • Light the room evenly and avoid standing in front of a bright window.
  • Hold the sheet flat with both hands, facing the camera, and keep it steady. Walk; do not run.
  • Tick “Show what the camera detects”. If the sheet is patchy, raise the tolerance. If the background lights up, lower it.