Doppler Effect with Moving Source

Wavefronts, Mach cone and the heard frequency, measured from simulated wavefront arrivals and checked against the Doppler formula.

The science

A source emitting f₀ pulses per second while moving at vₚ through a medium with wave speed c piles its wavefronts up ahead and stretches them behind. For an observer moving at vₒ along the same line the received frequency is

f' = f₀ (c − n vₒ) / (c − n vₚ), where n = +1 when the observer lies ahead of the source and n = −1 when behind (velocities are positive along +x).

How this is simulated. Each pulse k is emitted at tₖ = k/f₀ from position xₚ(tₖ) and expands as a circle of radius c (t − tₖ). The simulation steps time in 1/240 s and records the instant each circle reaches the observer by linear interpolation; the measured frequency is the inverse spacing of two consecutive arrivals. That number is then compared with the formula above (Check 1) - the agreement is the independent numerical test. Check 2 measures the cone angle from the wavefront geometry and compares it with asin(1/M).

Simplifications. One-dimensional motion along the line joining source and observer (so no transverse Doppler component), a non-moving uniform medium (no wind), no amplitude decay, and the emitted frequency is slowed to 0.5-4 Hz so that individual wavefronts are visible; only the ratio f'/f₀ matters, which is why the optional sound plays 440 Hz times that ratio.