Physics · runs on your GPU

Ripple — Wave & Interference Lab

A real 2D wave equation, solved on your graphics card every frame. Watch the double-slit experiment, diffraction, and refraction happen live. Paint walls, carve slits, drop ripples.

⚡ 100% in your browser — the whole simulation runs on your GPU, nothing uploaded
booting…

This browser can't run Ripple

Ripple needs WebGL2 with floating-point render targets. Try the latest Chrome, Edge, Firefox, or Safari on a desktop or a recent phone.

30
.98
90
Tip: the double-slit is loaded and running. Try switching the tool to Draw wall and carving your own slit, or drop single ripples in an empty tank.

What you're looking at

Most animations of waves are just drawings that loop. This one is not. Every frame, Ripple solves the real 2D wave equation on a grid of hundreds of thousands of cells, entirely on your GPU. Each cell looks at its neighbours, works out how the surface should move next, and passes that on. The striped interference pattern behind the two slits is not painted in. It falls out of the physics, the same way it does in a water tank or a laser lab.

How it runs in a browser

The wave height is stored in a floating-point texture. A WebGL2 fragment shader is run once per cell per step and applies a finite-difference version of the wave equation: the new height is twice the current height, minus the previous height, plus a term proportional to how much the neighbours differ. That is a discrete second derivative in both space and time. Two textures are swapped back and forth so each step reads the last state and writes the next one, and the grid is stepped several times between frames so the waves move at a satisfying speed. Walls are cells pinned to zero, so they reflect. A lens is a region where the wave travels slower, which bends the wavefront exactly like glass bends light.

Things to try

Switch to Two sources and watch the checkerboard of interference between them. Load the Lens preset and see a flat wave get focused to a point. Open the plain ripple tank, set the tool to Drop ripple, and tap two spots quickly to make two ring patterns collide. Paint a wall with a single narrow gap to see one slit spray a wave in every direction, which is diffraction. Turn damping down and the tank rings for longer; turn it up and it settles fast.

Questions

Is this a real simulation or a canned animation?

Real. Ripple integrates the 2D wave equation numerically on a grid every frame, in a GPU shader. The interference and diffraction come out of the maths, they are not hand-drawn.

Why does the double-slit make stripes?

Each slit becomes a new source of circular waves. Where a crest from one slit lines up with a crest from the other they add up (a bright band); where a crest meets a trough they cancel (a dark band). Those alternating bands are interference.

Is anything uploaded?

No. The whole thing runs on your GPU locally through WebGL2. Nothing leaves your device, and there is no sign-up.

It says my browser can't run it. Why?

Ripple needs WebGL2 and the ability to render into floating-point textures. Most current browsers support this, but some older phones and locked-down setups do not. Ripple detects that and tells you rather than showing a broken canvas.

Can I build my own setup?

Yes. Every tool is live: paint walls, carve slits, paint a slow lens region, erase, and drop single ripples anywhere. Change frequency, damping and contrast on the fly.

I build things like this every day.

Senior full-stack engineer, available for senior or contract work, fully remote. See the rest of the lab or get in touch.