Interactive doppler effect
Doppler Effect
Sound waves bunch up ahead of a mover and stretch out behind it. Drive into a siren and hear the pitch bend.
Hold ↑ to accelerate and ↓ to brake. Your own engine rings speed up with you. Watch the firetruck's rings pile up in front of it, then listen for the drop the instant it passes.
Grab the glowing source and throw it around the canvas. The rings compress ahead of your drag and stretch behind it. Push past Mach 1 and the rings pile into a shock cone.
Why the pitch bends
Each wavefront leaves the siren from wherever the truck is at that instant. Moving toward you, every new ring starts closer, so crests reach your ear more often: higher pitch. The moment it passes, the same motion stretches them: lower pitch.
What the rings show
Rings ahead of a mover sit close together and rings behind trail apart, while each ring stays a perfect circle around the spot where it was born. Your own car draws the same pattern, and it tightens as you accelerate.
For ultrasound
Color Doppler is this exact effect in tissue. Echoes returning from blood cells moving toward the probe come back compressed to a higher frequency. The machine paints that shift as the red and blue flow map.