Three draggable point sources radiate outward in phase space, and the field brightens or dims wherever those traveling sinusoids reinforce or cancel one another.
A DuckDuckGo search for Huygens-Fresnel principle wave interference turns up two anchors that matter here: the Wikipedia overview of the Huygens-Fresnel principle and the broader Wikipedia account of wave interference. The first gives the historical rule, going back to Huygens in 1678 and Fresnel's later interference formalization: every point on a wavefront can be treated as a source of secondary wavelets, and those wavelets interfere. The second describes what appears on screen as amplitudes add, brighten in phase, and cancel out of phase. The gallery sketch is a stripped browser translation of that argument.
The artifact sums contributions from multiple sources at every pixel of a lower-resolution offscreen field, then stretches that field back onto the canvas. Each source computes its distance to the current sample point, converts that distance into phase, discounts the amplitude slightly with distance, and adds the result into a shared accumulator. Plain superposition produces the ornate bands. Move one source a little and the whole geometry has to renegotiate itself because every pixel is listening to every source at once.
for(let s=0;s<n;s++){
const sx=sources[s].x*rW;
const sy=sources[s].y*rH;
const dx=x-sx,dy=y-sy;
const dist=Math.sqrt(dx*dx+dy*dy);
const falloff=1/(1+dist*0.02);
amp+=falloff*Math.sin(TAU*dist/wl-t);
}
amp/=n;
That loop is why the piece feels closer to physics pedagogy than to decorative shader work. The sketch does not solve a full wave equation on a lattice. It uses point sources and phase offsets, which makes it simpler than a fluid or membrane simulation, but it preserves the one fact interference needs: local intensity is a consequence of summed oscillation, not an intrinsic property of any single emitter. The color mapping then turns amplitude into a cyan-to-violet register, so constructive and destructive regions become legible without covering the mechanism in realism.
const norm=(amp+1)*0.5;
const hue=180+norm*100;
const sat=0.8+norm*0.2;
const lit=0.08+Math.abs(amp)*0.55;
The interface makes the model tactile. Three default sources give the field enough complexity to produce nodal webs immediately, and dragging relocates a wave origin while the entire screen recomputes the consequences. Open the full artifact page or jump straight to the gallery sketch.
Wave Interference
A multi-source interference field that approximates Huygens-Fresnel superposition by summing distance-based sine waves across an offscreen raster and coloring the resulting amplitude bands.
View artifact โ Open gallery sketch โ