...
running...
The science
Each pendulum contributes a damped sinusoid, the solution of the damped harmonic oscillator x'' + 2d x' + w0^2 x = 0 in the weakly damped limit:
x(t) = A1 sin(f1 t + p1) e^(-dt) + A2 sin(f2 t + p2) e^(-dt)
y(t) = A3 sin(f3 t + p3) e^(-dt) + A4 sin(f4 t + p4) e^(-dt)
With d = 0 and f1 : f3 = p : q (integers) the pen retraces the same Lissajous curve after a common period. With 1:1 and a 90 degree shift the curve is a circle, x^2 + y^2 = A^2. Damping multiplies every term by e^(-dt), so successive peaks shrink by the factor e^(-d 2 pi / f).
Honest simplifications: real harmonographs have frequency and damping that depend on the pendulum geometry, the frequency shifts slightly with amplitude, and the damping is not exactly viscous. This page uses ideal linear damped oscillators and a shared damping constant.
What is checked and why you can trust it
Every time the page loads, and whenever you press Re-run check, the simulation evaluates its own mathematics against an independent reference, such as a closed-form formula, a finite-difference derivative or an exhaustive count. Each line above reports PASS or FAIL together with the measured numbers, so you can see by how much it agrees. Results are also published on window.__msChecks for automated testing. The check never uses the same code path as the animation it validates, otherwise it would only confirm itself.
How to read a failure: a FAIL line means the measured discrepancy exceeded the stated tolerance for the current slider values. Try Reset, then move the sliders back toward their defaults; if a check still fails at the defaults it is a bug worth reporting. Tolerances are chosen from the numerical method itself, never tuned to make a test pass: round-off level (1e-9) for exact algebra, about 1e-3 for finite differences and Monte Carlo estimates with a few hundred thousand samples, and a documented margin for stochastic learning runs.
Reproducibility: the particle and pen simulations use the browser random generator for initial positions, so exact pixels differ between visits, but the checks depend only on mathematics and not on those positions. Fixed wave tables (curl noise) and fixed grammars (L-system) are deterministic.
This is an educational model. It shows the mechanism clearly, but it is deliberately simplified; the science panel lists what was left out.