This experiment lets you explore wave interference by overlapping two virtual sine waves, all rendered using WebGL shaders. You get detailed control over everything that affects these waves: their individual frequencies, how fast they travel relative to each other, and even how the space itself is warped.
The core concept here is superposition. When the two simulated waves cross paths in a 2D field, they interact. If their crests align perfectly, you see bright light (constructive interference). If they are out of sync, the colors cancel out, appearing mid-grey (destructive interference).
You can easily observe key physical patterns by adjusting controls like ‘A/B mix’ to isolate each wave and study its individual shape or direction. A small difference in frequency between the two waves will create striking moiré bands. A phase offset will shift the interference pattern across the canvas, while a domain warp will bend and twist the waves, creating complex spatial distortions.
By experimenting with these controls, you can intuitively understand fundamental principles found in optics and signal processing—from simple wave collisions to complex spatial distortions.
Speed ratio changes how fast wave B moves relative to wave A. At 1.0 both waves advance together.