hr-studioPhysics · 01
A computational design primer · Particle Systems

A thousand simple points, one living system.

The simplest simulation there is: a crowd of independent points, each carrying position and velocity, pushed by forces and stepped forward in time. It's the substrate under smoke, sparks, fountains and fireworks — and the forces are exactly the vectors from Foundations, now doing work. Build the loop from one particle up to a system you can tune into anything.

Scroll to begin
i.

State, plus a step

A particle is almost nothing: a position and a velocity. Every frame the loop runs once — a force sets acceleration, acceleration updates velocity, velocity updates position. The orange arrow is the velocity vector; the blue one is gravity pulling down. Watch them do the work a Foundations field only hinted at.

Drag from the launch point to aim and throw.

Orange = velocity · blue = gravity
ii.

Forces are a field of vectors

Direct particles instead of just dropping them by summing forces at every point in space — exactly a vector field. Here gravity, a swirling turbulence (a curl field), and a few draggable repellers add up; the faint arrows show the net force, and the particles simply ride it. Toggle each force and drag the repellers to reshape the flow.

The arrows are the same vectors from Foundations — now they push.

Drag the glowing attractor
iii.

Emitters give it life

One particle is a trick; a stream is a system. An emitter gives birth to particles with a spread of positions and velocities, each with a lifespan — they fade and die, recycled from a fixed pool so the count stays stable. Three dials turn a trickle into a fountain, a jet, or a fine drifting mist.

Set the emission rate, the spread, and how long each particle lives.

Born, aging, fading, gone
iv.

Meeting the world

Particles hit boundaries. Bouncing off a wall flips the velocity component into it and scales it by the restitution — how much energy survives the impact. At 1 it's a perpetual bouncer; near 0 it dies on contact and slides to rest. A bounce can only ever lose energy, never gain it — the first constraint the rest of this part builds on.

Change how bouncy the floor and walls are.

Rain, bounce, settle
v.

The particle playground

Everything at once. Drag the emitter, tap anywhere to fire a burst, drag the attractor, and tune gravity, wind, drag, emission, spread, lifetime and bounce until it becomes whatever you want — a fountain, drifting embers, snow, or sparks. Switch how it's drawn, and show the force field to see the vectors steering it all.

Drag the emitter ◆ and attractor ✦ · tap to burst
Position, velocity, a force, a step, repeated across a crowd — that's the whole engine, and the forces were vectors all along. Master this loop and every simulation in this part is a variation on it.