AliasLab
Nyquist–Shannon sampling theorem · live sinc reconstruction
fs / 2f · —
NYQUIST OK
Time domain
true x(t) samples reconstruction
Frequency domain
true f alias f Nyquist fs/2
Strobed disk
apparent · —
True signal frequency · f
5.0Hz
Sample rate · fs
20.0Hz
Nyquist fs/2
10.0 Hz
Apparent (aliased) f
5.0 Hz
Samples / cycle
4.00
Reconstruction error
< 0.01
1. Above Nyquist — reconstruction is perfect
1
2
3
4
5
Start here: f = 5 Hz, fs = 20 Hz. The sample rate is 4× the signal frequency — well above the Nyquist threshold of 2f = 10 Hz. The green reconstruction lays exactly on top of the blue true signal. The strobed disk on the right rotates the way it actually rotates. Sampling is information-preserving.
T next · R reset · ←→ fs · ↑↓ f

The theorem & the math behind the picture

Whittaker–Shannon interpolation: given samples x[n] taken at rate fs, the perfect reconstruction is
   x_r(t) = Σ x[n] · sinc(fs · (t − n/fs))
where sinc(u) = sin(πu)/(πu). The green curve is this sum — every visible sample contributes a sinc kernel.

Nyquist threshold: fs > 2·f_max. Above this, the sinc sum recovers x(t) exactly. Below it, the high-frequency content folds into the band [0, fs/2] and reappears at the aliased frequency
   f_alias = |f − fs · round(f/fs)|.
The reconstruction is now mathematically perfect — but it's fitting the wrong signal. That's aliasing.