Drawing the dot wave
The wave on this site starts as a rectangular grid. Each point has two coordinates, one for its column and one for its row. A regular grid looks flat, so the renderer shifts each point vertically before drawing it on a canvas.
Giving the grid depth
Two sine waves overlap. The first makes the broad folds. The second adds a smaller ripple. Each row samples a slightly different part of the waves, so a ridge builds up across several rows. Points near the front are a little larger.
Making it respond
Moving the pointer over the mesh adds a local displacement. The displacement falls off with distance, which lets the rest of the surface keep its shape. In the lab, the amplitude control changes the height of the folds, frequency changes their spacing, and speed changes how quickly they move.
Knowing when to stop
An intersection observer tracks whether the canvas is visible. When the wave leaves the viewport or the browser tab is hidden, the animation loop stops. A reduced-motion preference starts the surface as a still frame. You can explore the same geometry using the lab controls while the animation is paused.