Both pendulums obey the driven, damped pendulum equation
θ'' + q·θ' + sinθ = A·cos(ω_D·t)
with fixed damping q and drive frequency ωD. At small A the pendulum locks onto a periodic orbit that repeats every drive cycle. Raising A pushes it through a period-doubling cascade — period-1 → period-2 → period-4 → … — that accumulates into deterministic chaos, the same route Feigenbaum found in the logistic map.
The bifurcation diagram is built stroboscopically: once per drive period T = 2π/ωD, the current angle θ (wrapped to −π…π) is plotted against the current amplitude A. A single repeating angle draws one point per column (period-1); two alternating angles draw two (period-2); a smear of angles means chaos.
Pendulum B starts Δθ₀ away from Pendulum A. In a periodic regime the gap stays bounded or shrinks. In the chaotic regime it grows exponentially, |Δθ(t)| ≈ |Δθ₀|·e^(λt) — the butterfly effect, measured live as the Lyapunov exponent estimate λ.