[ 01 / 01 ]

[ PHYSICS DEMO ]

PHYSICS DEMO

[01/02]
Live Physics Demo · Real-time N-body

Two simulations. One timestep.
Watch what breaks.

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.

Simulation Controls
Speed 100×

Raw Physics — Variable Timestep
Method: 1 Euler step per frame  ·  dt: speedFactor × 0.01295 s  ·  Orbit: drifts due to large integration error
ZEQ Synced — Fixed Zeqond Substeps
Method: speedFactor substeps/frame  ·  dt: Zeqond/60 = 0.01295 s (fixed)  ·  Orbit: energy conserved, stable at any speed

Why the physics is honest

Raw — variable timestep

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.

ZEQ — fixed Zeqond substeps

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.

HulyaPulse 1.287 Hz
Zeqond 0.777 s
Substep dt 0.01295 s
α_K 0.00129
Integrator Symplectic Euler
Bodies Sun · Earth · Moon

Lyapunov Divergence

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.

Why Neptune Escapes Before Mercury

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 Docs

[02/02]
Solar System — All 8 Planets

Scale it up: Mercury to Neptune in one engine.

The 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.

ZEQ Sync ON · stable · Earth drift +0.0%

Energy conservation across 8 orbits

Outer planets escape first

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 integration proof sketch

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.