← Chaos

🌀 2D Thomas Attractor

b (damping): 0.208
Speed: 10
dx/dt = sin(y) − b·x
dy/dt = sin(z) − b·y
dz/dt = sin(x) − b·z
projected onto x–y, z → color/size
Divergence of two trajectories
started Δ₀ = 1×10⁻⁸ apart
separation d(t): —
λ estimate: —
warming up…
b: 0.208  |  t: 0.0  |  steps/frame: 10  |  regime: chaotic

🌀 2D Thomas Attractor — Watching Chaos Diverge

The same cyclically-symmetric Thomas system as its 3D counterpart, projected here onto the x–y plane so the divergence between two almost-identical trajectories — the real signature of chaos — can be read directly off the screen.

🔬 What It Demonstrates

Two trajectories start 1×10⁻⁸ apart and are both integrated with fourth-order Runge–Kutta. Their separation is tracked every step and renormalized (the Benettin method), giving a live estimate of the largest Lyapunov exponent λ — positive means the system is genuinely chaotic, not just visually busy.

🎮 How to Use

Drag b toward 0.208 to see λ turn clearly positive and the separation readout climb; push it above ≈0.27 to watch the orbit collapse into a periodic loop and λ drop toward zero or negative. Depth (z) is shown as color and dot size.

💡 Did You Know?

A positive Lyapunov exponent is the actual mathematical definition of chaos — not "looks random," but "nearby states separate exponentially fast." This page measures that number instead of just drawing pretty curves.

About the 2D Thomas Attractor

This page solves the same equations as the 3D Thomas attractor — dx/dt = sin(y) − b·x, dy/dt = sin(z) − b·y, dz/dt = sin(x) − b·z — with fourth-order Runge–Kutta at a fixed step of 0.01, but renders the result as a flat x–y projection with the z coordinate carried only as color hue and dot size. Rather than relying on 3D rotation to convey chaos, it runs a second "shadow" trajectory started 1×10⁻⁸ away from the first and continuously measures how fast the two drift apart.

That measurement is turned into a running estimate of the largest Lyapunov exponent using the standard renormalization trick: after each step, the separation is logged, then the shadow point is rescaled back to the original tiny distance along the same direction so it keeps probing the local stretching rate instead of saturating once it spans the whole attractor. A positive, stable λ readout is the quantitative proof that the system is chaotic; watching it fall toward zero or negative as b increases shows the transition to periodic motion happening in real time.

Frequently Asked Questions

How is this different from the 3D Thomas attractor?

It solves the identical ODE system, but instead of a rotatable WebGL scene it renders a fixed 2D x–y projection and adds a live, numeric Lyapunov exponent readout computed from a second, nearly-identical trajectory — a measurement the 3D version does not show.

What is the Lyapunov exponent shown here?

It is a live estimate of how fast two trajectories that start almost on top of each other pull apart, computed by renormalizing their separation after every integration step (the Benettin algorithm). A positive value is the formal definition of chaos.

Why does the shadow trajectory get rescaled?

Without rescaling, two chaotic trajectories separate until they are both just bouncing around the whole attractor, and the raw distance stops telling you anything about local stretching. Rescaling the shadow back to the original tiny offset after each step keeps the measurement tied to the instantaneous expansion rate.

What integration method is used?

Both the visible trajectory and its shadow are advanced with classic fourth-order Runge–Kutta at a fixed step of 0.01, evaluating the derivative four times per step for much better accuracy than simple Euler integration at the same step size.

Why does color change as the trajectory moves?

Because the view is a flat 2D projection of a 3D system, the z-coordinate — invisible in x and y — is mapped onto hue and dot size instead, so depth information is still visible even though the camera never rotates.

At what b value is chaos strongest here?

Around b ≈ 0.208, matching the classic Thomas attractor parameter, the measured Lyapunov exponent is clearly positive. Increasing b past roughly 0.27 collapses the orbit into a periodic loop and the exponent falls toward zero or negative.

Is this simulation accurate or just a stylized animation?

It performs genuine RK4 integration of the published Thomas equations rather than a decorative approximation, and the divergence panel reports an actual computed number (the Lyapunov estimate) rather than a scripted effect.