Skip to content
← Experiments
Medium2026

Orbits

Ten thousand tiny bodies, three invisible suns.

Your cursor is another sun, and it pulls. Press for a much stronger one.

Thousands of particles circle three attractors that wander around each other, with your cursor as a fourth. A close pass bends their orbits: they fly out, fall back in, and the picture never quite repeats.

Under the hood
  • Canvas 2D
  • N-body gravity
  • Lissajous

How it works

Every particle is pulled by all four centres under Newton's law of gravitation, softened close in so a direct hit doesn't throw it out of the simulation. The three suns follow Lissajous curves, so the system never settles into a repeating pattern.

Particles start on near-circular orbits around one sun each, and the others' pull slowly knocks them off course. The trails come from fading the previous frame, and speed changes colour: gold when slow, white when fast. If the machine can't keep up, the engine drops to fewer particles.

Want something like this on your own site?

Motion and WebGL are part of what I do. We'll work out what fits your site while keeping it fast.

Get an estimate
Next experiment
Orbits | KineticForm