Bend a photo, a screenshot or a pattern into waves. Each output pixel is read from a position displaced by a sine function, and because the read position is interpolated between neighbouring pixels the curve stays smooth at any amplitude.
Amplitude and wavelength
Both are set as a share of the shorter side, so the same values give the same look on a 600 px preview and a 4000 px download. Amplitude is the peak displacement: 2% is a gentle wobble, 10% rearranges the picture. Wavelength is the distance from one crest to the next: 100% fits one wave into the height, 10% fits ten.
Directions
Horizontal moves rows sideways, which bends vertical lines and leaves horizontal ones straight. Vertical does the opposite. Both combines them, which turns a grid into a lattice of curves. Ripple measures distance from the centre instead and pushes pixels along that radius, so concentric rings form as if a stone had dropped in.
Phase
Phase slides the wave without reshaping it. On a still image it is a composition control: move it until a crest lands where the picture needs it. On video the same step keeps advancing the phase from frame to frame, which is what makes the wave travel.
Edges
Pixels displaced past the border repeat the edge, which shows as a smear a few pixels wide at high amplitude. Crop the margin afterwards, or keep amplitude under about 5% when the edges matter.