Hundreds of particles fall towards the pointer. They swing past, loop back, collide with the walls and settle into orbits that never quite repeat. With a mouse, a click fixes the centre of gravity in place and another click sets it free to follow the pointer again. On a phone or tablet, a tap places the centre of gravity and a drag carries it around.
Ramaparticles began as a BBC BASIC program written many years ago. This new version keeps the original physics and adds trails that fade, a choice of colour schemes, a steady downward pull and the freedom to rewrite the law of gravity itself.
Photosensitivity warning: Ramaparticles shows fast-moving, flashing and pulsing light with bright colour changes. For a small number of people, patterns like these can trigger seizures. Please do not play if you have photosensitive epilepsy, and stop at once if you feel dizzy or unwell.
Ramaparticles shows fast-moving, flashing and pulsing light, with bright colour changes and high-contrast patterns. For a small number of people, patterns like these can trigger seizures, including in people with no history of epilepsy.
Please do not play if you have photosensitive epilepsy. Stop at once and look away if you feel dizzy, notice any change in your vision, or feel twitching or disorientation.
Ways to play
Roll the dice. The dice button creates a random new universe, with its own mix of settings, colours and effects. When one is special, the restart button replays it from the very beginning, and the share button keeps it for good.
Watch it breathe. Leave the pointer still in the middle and let the particles find their own orbits. Turn on fading trails for long, looping light paintings.
Change the universe. The Universe slider sets how quickly gravity weakens with distance. At 2 it follows the inverse square law of our own cosmos. Slide towards 1 and the pull reaches right across the screen, so the particles breathe in and out together. Slide towards 3 and the pull gathers close to the centre, flinging anything that passes near it out towards the walls. Every other setting is a universe that never existed.
Push instead of pull. Repulsion turns gravity inside out and the particles flee to the walls. Switch it back and watch them pour home.
Let it rain. Down adds a steady pull towards the floor. With soft walls the particles pile up, bounce and slosh like water.
Play with light. The Effects panel turns the universe into something new. Kaleidoscope mirrors every movement into a living mandala. Glow lets dense clusters blaze like a nebula. Speed colour shows every slingshot in red-hot colour, Stretch draws particles out like long-exposure photographs, and Twinkle, Colour drift, Constellations and Pulsing each add their own life. Particles can also become squares, stars, hexagons or tiny yin-yang symbols. The effects combine freely, and some combinations are remarkable.
Keep a picture. The camera button saves the screen as a PNG image, ready for a wallpaper or a post. When sharing pictures on social media, please add #ramaparticles, so we can all find each other's universes.
Share a universe. The share button creates a link that carries every setting, so a friend opens exactly the same world.
Keyboard
P or Space to pause, N for a random new universe, B or Esc to restart the current one, R to switch between attraction and repulsion, S and F for slower and faster, T for trails, W for walls, G for the downward pull, U for pulsing, K for the kaleidoscope, H to change shape, + and − to zoom, C to save a screenshot, X to fix or free the centre of gravity, O for settings and Z for full screen.
Ramaparticles Supporters' Edition
Supporters on Patreon can play the enhanced edition, with new physics to explore:
Vortex: a twist in gravity that spins the cloud into a spiral galaxy
Breathing gravity: the pull swells and fades in a slow rhythm to breathe along with
Black hole: whatever reaches the centre vanishes and is reborn at the edges
Accretion: particles that touch merge, building planets until only giants remain
Shockwave: a double-click or double-tap blasts a ring of force outwards
Wall sparks: hard impacts with the walls throw off showers of sparks
Ramaparticles was first written in BBC BASIC, the language that taught a generation of us to program. The web version on this page is a faithful port of that original, with the same physics at its heart.
The original BBC BASIC version, including the full source code and the executable, will be made available in the Patreon Members area. It is a chance to read the program line by line, run it as it first ran and change it for ourselves.
Copy and paste the code below into a web page. The embed carries the settings currently on the screen above, so set up a favourite universe first and the code updates as the sliders move.
Embed code copied.
The embedded version keeps every control, including full screen, settings and share links. The height can be changed to suit the page. The same code is also available from the settings panel under "Copy embed code".