Module 4: Integrable Systems, Action-Angle Coordinates & KAM Theory

1024×1024 GPU Winding-Number Poincaré Shader & 48 kHz Polyphonic Torus Sonification Lab — midi-sink (libsumi + Suzu)
{F_i, F_j} = 0  |  ω = lim (θ_N − θ₀)/2πN  |  K_c ≈ 0.971635

Part 1: Shader Lab — 1024×1024 GPU Poincaré Map & Empirical Winding Numbers ω(q₀, p₀) Click or drag on phase space to probe an orbit & drive the Part 2 Torus Synth

Each pixel in the 1024 × 1024 WebGL2 shader represents an initial condition (q₀, p₀) for the Chirikov Standard Map (chirikov.mdx, suzu::Rotor), Kessho's Arnol'd Tongue Twist Map (arnold.mdx), or the Hénon–Heiles system. The fragment shader iterates the symplectic map up to 500 times per pixel and colours each point by its empirical rotation number ω = (θ_N − θ₀)/(2πN), highlighting Golden-Ratio KAM Curves (ω = φ⁻¹ ≈ 0.6180) in gold and Poincaré–Birkhoff Resonant Island Chains in cyan/emerald.

Cursor (q₀, p₀): (3.14, 3.88) Rotation Number ω: 0.61803 (Golden KAM Torus!) Regime: Quasi-Periodic Diophantine Torus Kick K = 0.78 < K_c (0.9716)
What to look for on the 1024×1024 Canvas:
• Gold Contours: The Diophantine golden-ratio tori ω = φ⁻¹ ≈ 0.6180 and 1 − φ⁻¹ ≈ 0.3820. Notice how they stretch unbroken across q ∈ [0, 2π) until K = K_c ≈ 0.9716!
• Right-Edge Curve: The white curve plotted along the right margin is the 1D Devil's Staircase ω(p₀) at q₀ = π, showing flat vertical steps across every Poincaré–Birkhoff resonant island!

Part 2: Sound Lab — 48 kHz Polyphonic n-Torus Sonification (H(I, θ) = H₀(I) + ε H₁(I, θ)) Each angle θ_k(t) drives an oscillator sin(θ_k(t)) with θ̇_k = ∂H/∂I_k

We integrate a 3-torus (I₁, I₂, I₃, θ₁, θ₂, θ₃) ∈ D × 𝕋³ at audio rate (48 kHz). On a Diophantine KAM Torus (ω₂/ω₁ = φ⁻¹), the output is a crystalline, stationary inharmonic chord. On a Broken Rational Resonance (e.g. 1:2, 2:3, 3:4), the resonant phase ψ = rθ₁ − sθ₂ traps inside the Poincaré–Birkhoff island and librates at Ω_lib ∝ √ε, producing rhythmic phase-locking and low-frequency FM sidebands!

Torus Projection (sin θ₁, sin θ₂) & Slow Phase ψ Quasi-Periodic KAM Torus
Instantaneous Frequencies θ̇_k(t) = ∂H/∂I_k FM Ripple: ±0.2 Hz
Polyphonic Spectrum & Resonant FM Sidebands (ω_k ± m·Ω_lib) Island Libration Ω_lib / 2π: 0.0 Hz (Unlocked)
Audio: Stopped Frequency Ratio ω₂/ω₁: 0.61803 (Diophantine) Phase Lock: UNLOCKED (Stationary Chord) Action Exchange ΔI: 0.8%
Listening Guide:
• Click Golden KAM Torus (φ⁻¹): the Lissajous orbit weaves a stationary golden annulus and the 3-voice chord rings with crystal-clear stillness.
• Click Broken 2:3 Island Lock or Broken 1:2 Island Lock: the Lissajous figure snaps into a librating resonant loop and you hear unmistakable rhythmic FM pulsing and phase-locked beating at the island libration frequency Ω_lib ∝ √ε!