Force Composition

10.Forces

Compose forces — gravity, drag, springs — to get rich behavior from a single particle.

§RRead

Real motion is many forces at once.

Each force is a vector. Add up every force on the particle and divide by its mass to get the acceleration. Here the mass is 1, so the total force is the acceleration.

  • Gravity pulls down, the same amount every frame.
  • Drag pushes against the velocity, harder the faster you go: −c · vel.
  • A spring pulls toward its anchor, harder the further it's stretched: −k · (pos − anchor) (Hooke's law).

Combine them and a single particle does surprisingly rich things. Hair, water surfaces and cloth all start here.

§TTry

Toggle forces on and off.

Start with gravity only. Add drag and turn c up: the fall slows, because drag grows as the speed does. Turn on the spring: the particle swings around the anchor (gold dot). Turn k up and down to feel the stiffness.

fig. 10-1
start pos
start vel
change values, then Reset
fig. 10-1 — force-mixer — toggleable gravity, drag, and spring
§PPredict

Gravity + spring: where does it settle?

A spring's anchor is at y = 2 with k = 5. Gravity is 6 and the mass is 1. If the particle eventually stops, at what y does it hang?

§VVerify

Let it settle and check.

This is the setup from the question. Without drag it swings forever around the rest point, so tick drag, press Play, and wait until it stops. Then check where it came to rest.

fig. 10-2
start pos
start vel
change values, then Reset
fig. 10-2 — force-mixer — gravity + spring equilibrium
§MModify

Damped oscillator challenge.

Challenge: With gravity, spring and drag all on, tune the drag coefficient c so the particle comes to rest within five seconds of pressing Play. Too little drag and it keeps swinging. The checker replays your settings to time it.

fig. 10-3
start pos
start vel
change values, then Reset
fig. 10-3 — force-mixer — build a damped oscillator
Checkpoint

A particle is moving up and to the right. Which way does the drag force point?

Pass the check above to complete this lesson.