← Back to the desk

2026 Fluid simulationWebGLWeb Audio

Tap to drop ink, drag to stir

Ink

Drop ink into a tank of still water and watch it fall, billow and curl. Stir it with your finger.

Ink is a glass tank of still water. Tap to drop ink in: it falls in a plume, rolls up into a mushroom and curls into fine threads as it sinks. Drag to stir the water and pull the ink into swirls. Pick blue, red, black, green or yellow, and where colours meet they mix like pigment rather than light. Now and then a drop falls on its own; switch that off for a still tank, or pour in fresh water to start again.

How it works

The water is a real fluid simulation running on the GPU: every frame it carries the ink along with the flow, keeps the water from compressing, and puts back a little of the swirl that a coarse grid loses, which is what gives ink its curls. Ink is slightly heavier than water, so it sinks and drags the water down with it. Each drop lands with a push downwards and two small side currents that roll it into a vortex ring. Colour is stored as how much of each colour the ink absorbs, and the light passing through is dimmed by it, so blue and yellow really do make green and many colours together turn dark.

The sound is synthesised: a plop for each drop with a few bubbles after it, a low hum from the tank, and a soft swirl while you stir.

Built with

  • A stable-fluids solver in WebGL2 shaders (advection, buoyancy, vorticity, pressure)
  • Subtractive colour mixing in the display shader
  • Web Audio API for drops, bubbles and stirring