ANIMATIX WALKTHROUGH · HARMONIC FOURIER SERIES

Circles That Draw a Square Wave

  • 5 interactive figures
  • 1 master plate
  • WebGPU 60 FPS vector engine
  • Zero video buffering

A square wave looks like the least circular shape there is — sheer edges, flat tops, sharp corners. It is also, exactly, a sum of spinning circles. This walkthrough stacks odd harmonics one by one. Every figure compiles live in your browser over WebGPU.

Fig 00 // Master Fourier Suite · 5 Scenes
pkg-slim · 1.6MB 60 FPS WEBGPU
Master Composition · GPU Transition Wipes

The Complete Fourier Progression

Five scenes — destination, single sine wave, harmonic circle stack, frequency spectrum, and complex plane — joined smoothly by GPU wipes.

scene.amx ↗
Harmonics: k ∈ {1, 3, 5, 7} Decay Rate: Amplitudes ~ 1/k Symmetry: Odd / Anti-Symmetric
Fig 01 // The Target Square Wave Trace
pkg-slim · 1.6MB 60 FPS WEBGPU
01 · Target Synthesis

The Destination: Four Sines Make a Square

Four pure sine waves (frequencies 1, 3, 5, 7 with 1/k weights) cancel out into sheer sides, flat tops, and sharp corners.

goal.amx ↗
Primitive: PlotCurve stroke_progress Bounds: [-1.0, +1.0] Target Plateaus
Fig 02 // Rotation Unfolds into Waveform
pkg-slim · 1.6MB 60 FPS WEBGPU
02 · Geometric Kinematics

One Circle Unrolls One Sine

A pen rides the rim of a turning circle; its height over time traces a sine wave onto a scrolling paper history.

onecircle.amx ↗
Always Block: Reactive Kinematic Pen Scale: 1 y-unit = R · π / 4
Fig 03 // Harmonic Epicycle Chain
pkg-slim · 1.6MB 60 FPS WEBGPU
03 · Epicycle Stacking

Stacking Circles on Circles

The second circle (radius ⅓, 3× speed) rides the first's rim; the third (⅕, 5× speed) rides that. The tip of the last circle traces the increasingly rectangular waveform.

hero.amx ↗
Epicycles: 4 Nested Gyroscopes Frequencies: 1ω, 3ω, 5ω, 7ω Sync: Single Clock Always Loop
Fig 04 // Discrete Harmonic Frequency Spectrum
pkg-slim · 1.6MB 60 FPS WEBGPU
04 · Frequency Domain

Why Only Odd Harmonics?

Anti-symmetry (f(x + π) = -f(x)) cancels every even harmonic. The odd harmonics decay slowly as 1/k — this slow decay is why sharp geometric edges require high bandwidth.

spectrum.amx ↗
Chart: Declarative BarChart Null Slots: k = 2, 4, 6, 8 Exactly Zero
Fig 05 // Unit Circle on the Complex Plane
pkg-slim · 1.6MB 60 FPS WEBGPU
05 · Complex Analysis

Why Circles at All? e^(iθ)

Rotation is the fundamental atom of periodic motion. Writing waves as circles is identical to writing them as complex exponentials e^(iθ).

complexplane.amx ↗
Euler Formula: e^(iθ) = cos(θ) + i sin(θ) Grid: Declarative NumberPlane

How this page works

There is zero video and no server backend. The figures compile directly in your browser over WebGPU from declarative .amx scripts.