Driven Springs

Swarm · f(r) between bodies

f(r) = r − 1 − a · sin(ω · t)

Open in the app The dials and keys named below are the app's.

The setup

r − 1 − a·sin(ω·t) is a spring between every pair of bodies, read as positive where the pair pulls together. The force vanishes at r = 1 + a·sin(ω·t), so that distance is the natural length, and the last term only moves it up and down in time. At the opening values the natural length breathes between 0 and 2, once every 2π ≈ 6.28 seconds at Speed 1.

Every pair is told the same new length at the same moment. Nothing in the term depends on r, so it is not a stronger pull here and a weaker one there: the whole disc is given one instruction at a time. Twelve bodies therefore swell and shrink together rather than shuffling among themselves, and the cloud reads as one object with a pulse.

Driven, not parametric

The stiffness, the coefficient in front of r, never moves. Only the equilibrium does. That is what makes this a driven oscillator: a term added to the force from outside, rather than a change in the spring itself. A drive that moves the equilibrium pushes the swarm where it already wanted to go, and the answer is a steady pulse. A drive that moves the stiffness feeds the swarm's own jostling instead, and it heats up.

Once the first twenty seconds have settled, the cloud's radius comes out as a clean sine at the drive frequency. It swings by 0.34 about a mean near 1.0, about a third of its own size either way, and the jostling on top of that carries it between 0.49 and 1.65. Set a to 0 and the sine falls to a twentieth: what is left is the preset Springs, wandering between 0.56 and 0.98 with no beat at all. Its quickest wobble is near 1.4 seconds, faster than the drive, which is why the disc has time to follow the length it is handed.

Try

  • Drag a to 0: the drive is gone, the natural length is 1 again, and this is the preset Springs.
  • Drag a to 2: for part of every cycle the natural length is negative, which is pure attraction at any distance, so the disc is wrung tight and flung wide again, its radius running from 0.6 to 2.4. Past a ≈ 5 the swell outgrows the plot, so raise Span with it.
  • Drag ω to 10: ten pulses where there was one. The bodies cannot follow a length that changes faster than they can move, so the beat nearly disappears and the cloud simply sits wider.
  • Type (1 + a·sin(ω·t))(r − 1) instead: the drive now multiplies the stiffness rather than moving the length, which is the parametric case, and within half a minute the disc has pumped itself wider than the plot.
  • Set Bodies to 30: the pulse is unchanged in kind, because the drive speaks to every pair at once however many pairs there are.

Read more

Swarm · f(r) between bodies