nyquist.fun · a public-safety campaign against aliasing

The Wiggle That Wasn't There.

Caught on camera. Lying on tape.

NPSC Officer Nyq: "I sample responsibly."
INCIDENT REPORT #001
Location: every western ever filmed
Suspect: 8 identical spokes
Charge: driving backwards while going forwards
Evidence: video
Exhibit A · caught on camera

The Wagon Wheel of Lies

Both wheels are the same wheel, always turning forward at the speed you pick. Left is what your eyes see. Right is what a camera records: one photo per frame, nothing in between. Right now the camera takes only 6 photos per second, and its wheel rolls backwards. Nobody touched the brakes. Press the button to fix it, then play with the sliders to break it again.

🔬 NPSC Forensics Lab · Case #001How a wheel learns to drive backwardsCONFIDENTIAL

Evidence

The wheel turns forward the whole time. The camera footage shows it frozen, or rolling backwards.

Reconstruction: the photos

A wheel with 4 identical spokes. Between two photos it turns 80° forward, a little less than the 90° from one spoke to the next. Here are the camera's photos:

Findings

spoke pattern = (number of spokes) × (turns per second)  →  honest only if camera fps > 2 × spoke pattern

The wheel in See it has 8 spokes: at 0.5 turns/s its pattern repeats 8 × 0.5 = 4 times a second, so the camera needs more than 8 fps. That's the Nyquist rule, applied to spokes.

Verdict: temporal aliasing
Officer Nyq says: before you call an exorcist about your backwards wheels, check your frame rate.
INCIDENT REPORT #002 · 🔊 turn your volume down (iPhone: silent switch off)
Complaint: a tone that went down while going up
Recorded at: a cheap 8 kHz, no filter
Evidence: audio, below
Evidence: tape
Exhibit B · lying on tape

The Audio Crime Scene

A tone sweeps steadily up from 200 Hz to 11 kHz. Played correctly, it just rises. "Recorded" at a cheap 8 kHz with no anti-aliasing filter, it rises, then falls, then rises again, even though the real tone only ever went up.

Wheels that roll backwards, tones that sing the wrong note: same crime, same culprit. The rest of this page explains how it works.

Green = the real pitch · Orange = what you hear after 8 kHz sampling.
🔬 NPSC Forensics Lab · Case #002Why the tone turned around at 4 kHzCONFIDENTIAL

Evidence

A tone rises steadily from 200 Hz to 11 kHz. Recorded at 8 kHz, it is heard rising, then falling, then rising again.

Reconstruction

8,000 samples per second can only describe tones up to 4 kHz (half of 8). A higher tone doesn't disappear: it gets folded back below 4 kHz, like paper folded along the 4 kHz line.

real tonewhat you hear
3 kHz3 kHz
4 kHz4 kHz
5 kHz3 kHz
6 kHz2 kHz
7 kHz1 kHz
8 kHz0 kHz
9 kHz1 kHz
11 kHz3 kHz

Findings

heard = | f − 8 kHz × round(f / 8 kHz) |

Real recorders put an anti-aliasing filter in front of the sampler. It removes everything above 4 kHz before it can sneak in folded.

Verdict: frequency folding
Officer Nyq says: a pitch that goes down while going up is either aliasing or jazz. Use an anti-aliasing filter and find out which.
PUBLIC NOTICE
Issued by: Nyquist Public Safety Council
Applies to: all signals, at all times
Penalty for speeding: aliasing (non-negotiable)
By order of the NPSC

The whole theorem in one line

fs > 2 · fmax*

Translation: more than 2 snapshots per wiggle.

*Terms & conditions apply. Signal must be band-limited (no frequencies above fmax, not even a little bit. Sorry, square waves.) Reconstruction requires an ideal low-pass filter, which, like a perfectly tidy desk, exists only in theory. Note the strict ">": right on the limit is a trap.

fs: the sample rate, meaning how many snapshots per second your camera or recorder takes.
fmax: the highest frequency, meaning the fastest wiggle in whatever you're capturing: a spinning wheel, a sound, or a radio wave.
fs/2: the speed limit (the Nyquist frequency). fmax must stay below it. Anything faster doesn't vanish; it shows up wearing a disguise.
Officer Nyq says: read the fine print. The asterisk is where the crimes happen.
INCIDENT REPORT #003
Charge: identity fraud
Suspect: 9 Hz, a.k.a. "1 Hz" (yes, that's literally what "alias" means)
Accomplice: a sample rate of 10 Hz
Guilty of impersonation

Sine Wave Playground: spot the impostor

The faint line is the real signal. The dots are your samples. The dashed line is what anyone holding only the dots would reconstruct. When the dashed line doesn't match: impostor detected.

🔬 NPSC Forensics Lab · Case #003How to unmask an impostorCONFIDENTIAL

Evidence

A 9 Hz wave, 10 samples per second. The dots fit a 1 Hz wave perfectly.

Reconstruction

Between two samples the 9 Hz wave goes through 0.9 of a cycle. Going 0.9 forward lands on exactly the same spot as going 0.1 backward, just like the wheel. So the dots also fit a wave that does only 0.1 cycles per sample: 1 Hz.

Findings

impostor = | f − fs × round(f / fs) | = | 9 − 10 × 1 | = 1 Hz
cos(2π·9·n/10 + φ) = cos(2π·n − 2π·1·n/10 + φ) = cos(2π·1·n/10 − φ)

Same dots, and the phase comes out mirrored (φ becomes −φ). That's why the playground shows "mirrored!" above the limit.

Verdict: impersonation (a.k.a. aliasing)
Officer Nyq says: if the dots also fit a slower wave, trust nothing. The dots can't tell you which wave they came from.
INCIDENT REPORT #004 · for the brave
Case: disappearance of the imaginary part
Last seen: below fs/2
Witness: the FFT's lonely middle bin
Case closed · Im = 0 · missing

At exactly fs/2, the wiggle goes missing

At exactly fs/2 you take exactly 2 snapshots per wiggle. Catch the peaks and it looks fine. Catch the zero crossings and you record nothing at all.

The Invisible Sine

Green is the real wave. The dots are your snapshots. Connect the dots and you get the dashed wave: smaller than the real one, or even flat. With exactly 2 snapshots per wiggle, how much you see is pure luck: it depends on how the wave lines up with your snapshots. Same wiggle, tiny shift, different result.

🔬 NPSC Forensics Lab · Case #004Where did the wiggle go?CONFIDENTIAL

Evidence

A full-size wave, sampled exactly twice per wiggle, can produce samples that are all zero. Where did it go?

Reconstruction: a clock hand and a lamp

Picture the wave as a clock hand going round. A lamp above throws its shadow on the floor. The shadow sliding left and right is the wave you record. Each sample is one photo.

4 photos per turn. 12 → 3 → 6 → 9 o'clock: clearly turning clockwise, and the shadow swings left and right. ✓ That's a wave.

The fix: anything more than 2 photos per turn. Even 3 is enough: The shortest way between photos is clockwise again, and the shadows trace the wave whatever moment you start. ✓

The punchline: the shadow only shows left-right. The up-down position of the hand never reaches the floor; mathematicians call that part "imaginary". Normally you can still work it out from how the shadow moves between photos. At exactly 2 photos per turn you can't, not even the direction. 🔍 Im: missing.

Findings

For the mathematicians: the clock hand is a complex number eiθ. Its shadow is the real part, its up-down position the imaginary part. A real wave is two such hands turning in opposite directions:

cos(2πf·n/fs + φ) = ½·e+i(…) + ½·e−i(…)   ← twins, imaginary parts cancel (for every real wave)

At f = fs/2 the angle per sample is π, so eiπn = (−1)n, so the twins now spin at the same frequency and merge into one: ½A·eiφ + ½A·e−iφ = A·cos φ. Real, and the sine part, A·sin φ, which would have told you the phase, is gone for good. That's why the safe rule says > and not ≥. In the FFT the same thing appears as the lonely middle bin:

X[N/2] = Σ x[n]·e−iπn = Σ x[n]·(−1)n  ∈ ℝ   (for real x[n]: always real, just like the DC bin)
Verdict: Im = 0 · case closed
Officer Nyq says: two witnesses per wiggle can't agree. Call a third.
MOST WANTED
Known repeat offenders, seen in public.
If spotted: do not try to sample them yourself.
Wanted

Aliasing Crimes in the Wild

The Floating Helicopter

The camera's frame rate matches the rotor, so the blades stand still and the chopper "flies" anyway.

The Haunted Shirt

Fine stripes plus a TV camera's pixel grid make swirly moiré ghosts. Presenters are told not to wear them.

44.1k

Why CDs Use 44.1 kHz

Humans hear up to about 20 kHz. Times 2 is 40 kHz, plus room for the anti-aliasing filter. Why exactly 44.1? Early digital audio was stored on video tape: 3 samples × 245 lines × 60 fields = 44,100.

In Europe: 3 × 294 lines × 50 fields, the same 44,100.

The Jaggies

Pixels are spatial samples. A slanted line becomes a staircase. Games smooth edges by taking extra samples per pixel (anti-aliasing).

Officer Nyq says: your screen samples this page, too: about 60 times a second. Even the blinking shutter light back in Incident #001 is under investigation.
OFFICER TRAINING
Five questions. Ranks from Civilian
to Chief Nyquist Inspector.

Are You Nyquist-Compliant?

1. In a video, a car drives forward but its wheels seem to roll backwards. Why?
2. A 6 kHz tone recorded at 8 kHz sounds like…
3. Something wiggles 5 times per second. How many snapshots per second do you need?
4. Something sneaky in your signal wiggles faster than the speed limit. What do you do first?
5. A wheel with 4 spokes turns once per second. You film it at 4 frames per second. What does the video show?

📞 NPSC Alias Hotline

Open 24/7. Every call sampled responsibly. What did you witness?