PHYSICS DEMO
Both panels run identical N-body gravitational physics — same code, same initial conditions, same integrator. The only difference: left uses one large Euler step, right uses Zeqond-locked fixed substeps. The drift is real.
At speed multiplier S, the left panel fires 1 step per frame with
dt = S × 0.01295 s. At S=100, Earth must traverse one-eighth of its
orbit in a single calculation. Symplectic Euler is no longer symplectic
with a large, variable timestep — the orbit loses angular momentum coherence
and spirals inward. This is real numerical error, not injected noise.
The right panel fires S substeps per frame, each at the fixed
Zeqond substep dt = 0.777 / 60 = 0.01295 s. Fixed-timestep
symplectic Euler is provably energy-conserving (bounded oscillation, not drift).
Running more substeps per visual frame achieves higher simulation speed
without sacrificing integration accuracy — that is the ZEQ advantage.
N-body chaos is characterized by a positive Lyapunov exponent λ > 0: nearby trajectories separate as
‖δ(t)‖ ≈ ‖δ₀‖ e^(λt).
A variable-timestep integrator introduces an energy error ε per step that grows with dt. At speed multiplier S=100
the per-frame dt is 100× larger, injecting 100× more error per visual frame. This exponentially amplifies the
natural Lyapunov divergence — the left panel's collapse is not a bug; it is the physics.
Each Euler step accumulates a fractional energy error proportional to dt/T, where T is the local orbital period. Neptune's period is ≈165 years; Mercury's is ≈88 days. With a large dt, Neptune completes far fewer radians per step and its relative integration error per orbit is greater — so it accumulates enough total error to escape its potential well first, even though Mercury is the faster body. The ZEQ fixed substep keeps dt/T small for all planets simultaneously.
The same principle applies to your application — game physics, financial simulations, scientific computing. Fixed Zeqond timesteps keep results reproducible and stable across any compute speed.
Get API Access → Framework DocsThe same fixed-substep principle extended to 8 planets. Every orbit — from Mercury's 88-day period to Neptune's 165-year sweep — runs stably at 300× real time on a single Zeqond-locked timestep. Toggle Sync off and watch the entropic chaos. The math is unforgiving.
When Sync is OFF, each Euler step accumulates energy error ∝ dt/T where T is the orbital period. Neptune's T ≈ 165 years means fewer radians per step — so its relative error per orbit is largest. It escapes the Sun's potential well first, then Saturn, Uranus, Jupiter. Mercury, despite its speed, loses the least energy per orbit and holds on longest.
Symplectic Euler maps phase space volume exactly (Liouville's theorem). For fixed dt, it conserves
a modified Hamiltonian H̃ = H + O(dt). Energy oscillates around H̃ without drift.
The 300 substeps/frame each use dt = 0.01295 s (fixed) — so all 8 planets orbit
inside the symplectic guarantee simultaneously, at any visual speed.