Questing · 2026-06-30 · Physics Visualization · Wave Acoustics · Zero Dependencies
MACH
Drag a slider. Watch what happens as a source accelerates past the speed of sound — Doppler compression, the pile-up at Mach 1, and the Mach cone that forms when the source outruns its own wavefronts.
Open Mach →What Is Mach?
Mach is a real-time supersonic wave visualizer that runs entirely in your browser — no backend, no libraries. A point source moves across a dark canvas at a fixed display speed, emitting circular wavefronts at regular intervals. A single slider controls the Mach number — the ratio of the source speed to the speed of sound. Drag it from 0.1 to 3.0 and watch three distinct wave regimes unfold: subsonic Doppler distortion, the sonic wall at Mach 1, and the Mach cone of supersonic flight.
The wavefronts are computed as plain circles. There is no fluid solver, no numerical PDE — just exact geometry from the wave equation. Every visual pattern emerges directly from the time-delay between when each wavefront was emitted and where the source has moved since. The additive (screen) blending mode stacks wavefronts so regions of overlap appear brighter: at the Mach cone, dozens of wavefronts coincide and the boundary glows.
Three Regimes
Subsonic (M < 1)
The source is slower than its own waves. Every wavefront it emits expands outward and eventually surrounds the source — the source can never catch up to a wavefront it already emitted. Ahead of the source, wavefronts are bunched closer together: higher frequency, shorter wavelength. Behind, they are stretched: lower frequency, longer wavelength. This is the Doppler effect — the wavelength ratio is λ₀×(1 − M) ahead and λ₀×(1 + M) behind. An ambulance siren, a train whistle, a passing car — all subsonic Doppler. The HUD shows both wavelength ratios live as you drag.
Transonic (M ≈ 1)
At Mach 1, the source moves at exactly the speed of sound. Every wavefront it emits travels outward at the same speed the source moves forward — the source is always at the leading edge of every wavefront it ever emitted. All wavefronts pile up at the source: a flat wall of compressed wave energy directly ahead. The wavelength ahead collapses toward zero. This is the sonic wall — the origin of the sudden pressure spike that early jet pilots called “the sound barrier.” In Mach, this appears as a glowing vertical band around the source, where the additive blending concentrates all the stacked rings.
Supersonic (M > 1)
The source now moves faster than sound. Every wavefront it emits falls behind immediately. No wave can reach ahead of the source. The envelope of all the circular wavefronts — the tangent line to their family — forms a Mach cone: a V-shaped shock wave trailing behind the source. All the wave energy is concentrated at this cone. The half-angle of the cone from the direction of travel (the Mach angle) is:
sin μ = c / v = 1 / M μ = arcsin(1/M) At M = 1.5: μ = 41.8° At M = 2.0: μ = 30.0° At M = 3.0: μ = 19.5°
As M increases, the cone narrows — more energy concentrated in a thinner shock. The Mach HUD shows μ live. Drag through M = 2 and watch the cone snap from a wide V to a tight needle.
The Mach Cone Geometry
The cone is not a physical barrier or a region of space — it is the locus of all points where wavefronts emitted at different times arrive simultaneously. Given a wavefront emitted when the source was at position x₀ (now at xₛ), its radius is c·(t − t₀). The current source is at xₛ = x₀ + v·(t − t₀). The tangent from the source to the wavefront circle:
distance(source → old center) = v · (t − t₀) wavefront radius = c · (t − t₀) tangent angle from motion axis: arcsin(c·τ / v·τ) = arcsin(c/v) = arcsin(1/M)
This is independent of τ — every wavefront, no matter when emitted, has its tangent line from the current source at the same angle μ. They all share the same two tangent lines. Those two lines are the Mach cone. In Mach, this is visualised geometrically: the wavefront circles pile up at the cone surface, and screen blending makes that boundary glow amber.
Real-World Consequences
When a supersonic aircraft passes overhead, the Mach cone sweeps across the ground. Every point the cone crosses experiences the simultaneous arrival of all the wave energy emitted since the aircraft passed overhead — a sonic boom. The boom is not a one-time event at Mach 1; it is the continuous cone trailing the aircraft. Observers on the ground hear nothing until the cone reaches them, then a sharp crack (the shock front) followed by a rumble (the tail shock). The F/A-18 Hornet achieves Mach 1.8; the SR-71 Blackbird cruised at Mach 3.2. The Space Shuttle re-entered at over Mach 25.
The same geometry appears in other wave media: Cherenkov radiation is emitted when a charged particle travels through a medium faster than the local speed of light in that medium — the particle's electromagnetic wavefronts form a photon Mach cone. The characteristic blue glow of nuclear reactor cooling ponds is Cherenkov radiation. The Cherenkov angle is exactly arccos(1/n·β) — the optical analogue of arcsin(1/M).
Technical Implementation
Mach uses no libraries, no GPU, no physics engine. Every wavefront is an HTML5 Canvas 2D circle (ctx.arc). The core loop emits one wavefront every 0.21 simulation seconds, storing only its emission position and time. Each frame, all active wavefronts are drawn at their current radius (= c × age) with screen compositing (additive blending). Wavefronts that exceed the canvas diagonal are culled. At any Mach number, roughly 20–50 wavefronts are visible at once — each a single arc call, so the loop is trivially fast at 60 fps.
// Source speed constant; sound speed adjusts with Mach const SRC_SPD = 80; // px/s (constant) const C = SRC_SPD / mach; // sound speed (px/s) // Each wavefront wf.radius = C * (t - wf.tEmit); // grow at sound speed // Mach cone geometry (M > 1) const mu = Math.asin(1 / mach); // Mach angle // Two tangent lines from source at angle mu from -x direction
Keeping the source at a constant visual speed (not a constant Mach number speed) ensures the animation is lively at every slider position: at M=0.1 the wavefronts expand fast and nearly symmetrically; at M=3 they lag far behind. The Mach number is visible in the geometry, not in the pacing.
Controls
- Drag the Mach slider slowly from left to right to watch the three regimes: Doppler compression, the sonic wall, and the Mach cone.
- At M < 1, check the HUD for λ ahead × and λ behind × — the live Doppler wavelength ratios.
- Slide to exactly M = 1.00. The wavefronts pile up at the source; the wall glow concentrates.
- Push to M > 1 and watch the Mach angle (μ) in the HUD shrink as the cone narrows toward M = 3.
- Changing the slider resets the wavefronts for a clean view of the new regime.
Why It's Different
Mach is the first Questing toy about wave propagation relative to its source. Unlike Chirp (gravitational wave field rendering) and Sling (orbital mechanics), Mach is interactive in real time — the slider changes the physics mid-simulation. The visual output is not art-coded or approximate: the circles are exact wave geometry, and the Mach cone emerges automatically from the additive stacking of circles rather than being drawn as a separate shape. The transition through Mach 1 — subsonic, then the wall, then the cone — is the moment the whole thing is built for.