Wavefoundry
Draw a signal. Shape its hidden harmonics. Discover how infinitely many simple waves can build something extraordinary.
Construct the impossible
The spectrum bench
Select a harmonic below, or drag its purple bar up and down to change its amplitude. The pale bars show the mathematically ideal target.
Sharper corners need higher frequencies. Watch the ringing near the square wave's discontinuities.
The challenge studio
Loading your first numerical investigation…
Why the waveform obeys you.
Every visible curve is calculated directly from the same Fourier coefficients that you edit.
Decompose a signal
Recognise that a periodic function can be approximated using a sum of sinusoidal harmonics.
Calculate coefficients
Interpret amplitude and phase, and use sine–cosine orthogonality to extract coefficients.
Investigate accuracy
Measure reconstruction error and explain the effect of extra harmonics, especially at jumps.
a₀ = ∫₀¹ f(x) dx · aₙ = 2∫₀¹ f(x)cos(2πnx) dx · bₙ = 2∫₀¹ f(x)sin(2πnx) dx
Assumptions & limitations
The horizontal axis shows one normalised period (x = 0–1). The model approximates real, periodic functions using up to 12 harmonics; painting is sampled digitally with midpoint integration. Amplitudes are dimensionless (arbitrary units). At discontinuities, truncated Fourier sums show Gibbs ringing. The accuracy score is a classroom visual metric; the RMS error is the quantitative measure.
Where this matters
Engineers use frequency-domain thinking to study sound, radio transmission, image compression, vibrations and digital signal processing. The adjustable base frequency changes the time scale, but not the shape of a signal over one normalised period.