An animation is a list of still images shown fast.
To make motion, we write a function that takes the current time and returns the state of the scene at that moment. The simulator calls this function roughly 60 times per second. Each call is one frame. The time between frames is dt — usually about 0.016 seconds (1/60th of a second).
The simplest motion: position = velocity * time. A constant velocity means constant speed in a straight line. Change the formula, change the motion.
Step through frames manually.
The particle below starts at rest. Press "Step 1 Frame" to advance time by dt. Each step updates position by velocity * dt. Press "Play" to run continuously.
What if velocity isn't constant?
If x = t * t, the particle accelerates — it moves faster each frame. What does the trail look like?
Reveal
The dots in the trail get further apart over time — the particle speeds up. This is acceleration, and it is what gravity does to a falling ball.
Verify: add gravity.
Press Play below. With gravity enabled, the vertical velocity increases each frame. The trajectory curves — a parabola.
Explore oscillation.
Challenge: Can you make the particle oscillate back and forth? Toggle the spring force on (next lesson previews this). The particle will bob around the anchor point.
You now understand frames and dt. Animation is position updated in a loop. Mark this lesson complete to continue.