> RESONANT CASCADE CIPHER
The idea in plain English: A mass on a spring has a natural frequency — push it at that frequency and the oscillations grow. Drive it too hard and the spring snaps. This cipher encodes a message as a pattern of which frequencies cause the oscillator to break and which don't.
Why this exists: Resonance is everywhere — from tuning a radio to the Tacoma Narrows Bridge collapse (1940), from wine glasses shattering at the right note to MRI machines. This cipher turns that physical phenomenon into a bit sequence that spells a hidden word.
▸ The Physics
A damped driven harmonic oscillator is governed by:
At resonance (f = f₀), the amplitude simplifies to A = A_drive / (2γ). The sharper the damping (smaller γ), the more dramatic the resonance peak — fewer frequencies near f₀ cause collapse.
▸ How to Decode (Step by Step)
1. You receive the oscillator parameters: f₀, γ, A_drive, A_max
2. You receive a list of driving frequencies that were applied in order
3. For each frequency, compute A(f) using the formula above
4. If A(f) > A_max → COLLAPSE (bit = 1). If A(f) ≤ A_max → SAFE (bit = 0)
5. Collect all bits. Group in 5-bit chunks
6. Each 5-bit group maps to a letter: 00001 = A, 00010 = B, ..., 11010 = Z
7. The resulting word is your answer
import math
def amplitude(f, f0, gamma, A_drive):
ratio = f / f0
denom = math.sqrt((1 - ratio**2)**2 + (2 * gamma * ratio)**2)
return A_drive / denom if denom > 0 else float('inf')
A_max = 3.5
bits = [int(amplitude(f, f0, gamma, A_drive) > A_max) for f in frequencies]
def bits_to_letter(bits):
idx = sum(b << (4-i) for i, b in enumerate(bits))
return chr(ord('a') + idx - 1)
▸ Concrete Example
Oscillator: f₀ = 6.0 Hz, γ = 0.12, A_drive = 1.0, A_max = 2.5
Frequencies tested: [6.0, 2.0, 5.9, 8.5, 6.2]
A(2.0) = 1.0 / sqrt((1-0.11)² + (2·0.12·0.33)²) ≈ 1.01 → SAFE → 0
A(5.9) = 1.0 / sqrt((1-0.97)² + (2·0.12·0.98)²) ≈ 3.51 → COLLAPSE → 1
A(8.5) = 1.0 / sqrt((1-2.01)² + (2·0.12·1.42)²) ≈ 0.58 → SAFE → 0
A(6.2) = 1.0 / sqrt((1-1.07)² + (2·0.12·1.03)²) ≈ 3.08 → COLLAPSE → 1
Bits: 1 0 1 0 1 → 10101 = letter 21 = U
▸ Real-World Connections
- Tacoma Narrows Bridge (1940): Wind driving at the bridge's natural frequency caused destructive resonance — the bridge tore itself apart. The "Galloping Gertie" collapse is the classic cautionary tale.
- Wine glass resonance: A singer hitting exactly the right note can shatter a glass — the driving frequency matches the glass' resonant frequency, amplitude exceeds the glass' structural limit.
- Radio tuning: A radio tunes by adjusting its resonant circuit to match the carrier frequency of the desired station — all other frequencies are damped out.
- MRI machines: Hydrogen nuclei resonate at specific frequencies in a magnetic field — exactly the same physics, different scale.
- Earthquake engineering: Buildings are designed so their natural frequencies don't match common earthquake frequencies — avoiding catastrophic resonance.