Posts
1 min read

The dots behind this site are spacetime

The dot grid behind every page is a small model of spacetime. Suns sink it, asteroids bend through it, and your cursor pushes back.

The grid of dots behind this page is a sheet of spacetime. Three small suns sink it, two on a phone. Asteroids bend through it, and your cursor pushes it up.

The page shows the sheet from straight above, so a well is just dots drawn closer together and redder. Turn the figure to the side and they drop into a funnel with the sun at the bottom.

  • Suns pull the dots down.
  • Asteroids come in every second or two and bend round the suns. Some fall in.
  • Your cursor lifts a blue hill that asteroids roll away from. On a phone, your finger does it.
  • A click or tap sends a ripple that shoves any asteroid in its way and fades as it spreads.

Play with it

Build your own. Add suns, launch asteroids and see what stays in orbit.

Make it heavier. A heavier sun digs a deeper well. Too heavy and the orbits fall in. Too light and they fly off.

Slingshot. Throw an asteroid round the sun and through the ring.

Keeping it cheap

It runs on every page, so it has to cost almost nothing: about 1,600 dots on a laptop, moved and drawn in 0.4 ms a frame. It waits for the page to be idle, stops in a hidden tab and holds still under Reduce Motion.

One more thing

The lowest sun keeps count of the asteroids it swallows. I'll leave it there.