Fourier Series Builds a Square Wave

Fourier Series Approximation of a Square Wave

Overview

A brief visual demonstration of how a square wave is progressively approximated by adding more odd‑harmonic sine terms from its Fourier series, illustrating convergence toward the ideal waveform.


Phases

# Phase Name Duration Description
1 Intro ~3 s Title fades in at the top. The ideal square wave (black, dashed) appears faintly as a reference.
2 First Term (n=1) ~4 s The first sine term 4πsin(x)\frac{4}{\pi}\sin(x) is drawn in blue, forming the initial approximation. The partial‑sum equation S1(x)=4πsinxS_1(x)=\frac{4}{\pi}\sin x appears at the bottom.
3 Add Third Harmonic (n=3) ~4 s The next odd term 43πsin(3x)\frac{4}{3\pi}\sin(3x) fades in (green) and adds to the existing wave, updating the visual to the new sum. Equation updates to S2(x)=4π(sinx+13sin3x)S_2(x)=\frac{4}{\pi}\bigl(\sin x+\frac{1}{3}\sin 3x\bigr).
4 Add Fifth Harmonic (n=5) ~4 s The fifth term 45πsin(5x)\frac{4}{5\pi}\sin(5x) appears (red) and the combined waveform updates. Equation becomes S3(x)=4π(sinx+13sin3x+15sin5x)S_3(x)=\frac{4}{\pi}\bigl(\sin x+\frac{1}{3}\sin 3x+\frac{1}{5}\sin 5x\bigr).
5 Convergence Overview (up to N terms) ~5 s A rapid loop adds successive odd terms up to a chosen NN (e.g., 9 terms). Each new term briefly flashes a different color, the waveform smooths, and the equation updates accordingly.
6 Outro ~2 s The final approximation (with NN terms) stays on screen while the reference square wave becomes solid. Title fades out, leaving a caption "Fourier series converges to the square wave as more odd harmonics are added."

Layout

┌─────────────────────────────────────────────┐
│                 TOP AREA                    │
├─────────────────────────────────────────────┤
│                 MAIN VISUAL                 │
│               (centered plot)               │
├─────────────────────────────────────────────┤
│                BOTTOM AREA                  │
└─────────────────────────────────────────────┘

Area Descriptions

Area Content Notes
Top Title "Fourier Series Approximation of a Square Wave" Fades in during Intro, fades out in Outro
Main Visual Plot showing the reference square wave (dashed) and the current Fourier partial sum (solid, colored per term) Central focus; new sine term added with a smooth fade‑in and additive overlay
Bottom Current partial‑sum equation Sk(x)S_k(x) displayed in LaTeX Updates each phase; small but readable font

Notes

  • Only odd harmonics are used: term index n=1,3,5,n = 1,3,5,\dots.
  • Each new sine component should be introduced with a brief highlight (e.g., a brighter outline) before blending into the cumulative waveform.
  • The reference square wave remains constant throughout, serving as a visual benchmark.
  • Keep total runtime under 30 seconds; the rapid convergence loop (Phase 5) should be fast enough to stay within this limit.
  • No textual narration is required; the visual progression and equations convey the concept.

作成者

jack iamatlandjack iamatland

説明

The animation shows a square wave as a reference and adds successive odd sine terms from its Fourier series. First the fundamental sine appears, then the third, fifth, and further odd harmonics are introduced, each in a new color. The partial‑sum equation updates at the bottom. A rapid loop demonstrates how adding more terms smooths the waveform, converging to the ideal square shape. The title fades in and out, ending with a caption about convergence.

作成日時

Mar 20, 2026, 03:29 PM

長さ

0:25

タグ

fourier-seriessquare-wavesignal-processing

状態

完了
AI モデル
Auto