Multi-Scroll Attractors & Hyperchaos: an interactive primer

From the double-scroll of a Chua circuit to deterministic Lévy-like exploration and chaotic image encryption

A chaotic trajectory looks random but is generated by a purely deterministic rule. That combination (a fixed recipe that nonetheless explores space in an intricate, broadband, hard-to-predict way and is exquisitely sensitive to its starting point) makes chaos a tunable stand-in for randomness, and the same properties power pseudo-random number generation, secure communication, image and signal encryption, and wide-band signal design.

Not all chaotic dynamics are alike, and this widget is built around two independent ways to enrich them. The first is geometric: a chaotic flow can spiral around one, two, or many equilibria (“scrolls”), and adding more scrolls enlarges and complicates the region the orbit roams without changing how many directions it is unstable in. The second is dynamical: a system can have one or more positive Lyapunov exponents, i.e. one or more independent directions along which nearby trajectories are stretched apart exponentially; the term hyperchaos is reserved for chaos with two or more such directions and (for a continuous-time autonomous ODE) requires at least four state dimensions. These axes are orthogonal: ordinary 3D chaos can have many scrolls (multi-scroll attractors remain 3D and have a single positive Lyapunov exponent), and a 4D hyperchaotic system can have as few as two scrolls. Multi-scroll does not imply hyperchaos, and vice versa.

The widget walks the geometric axis first, building intuition with (1) the canonical double-scroll and (2) its multi-scroll generalizations (whose “long-spiral, then-jump” tour mimics a deterministic Lévy flight), then (3) separates a merely unstable system from a chaotic one and (4) moves to the dynamical axis with a 4D hyperchaotic system; (5) the closing tab puts both ideas to work on image encryption.

© 2026 Theodore P. Pavlic · MIT License

Chua's circuit: 3D phase portrait (x, y, z)

The trajectory winds around two unstable foci P⁺ and P⁻ (orange squares), spiraling outward on one until tossed across the saddle at the origin (orange ×) to spiral on the other. Color fades from deep navy (early) to orange (late) so the order of points is visible.

Controls

regime:

Time series overlay any subset of x(t), y(t), z(t)

The three state variables share the same scroll-switching events but differ in amplitude and phase: x(t) and y(t) stay within a unit interval (capacitor voltages, scaled); z(t) swings larger (inductor current). The sign of x(t) identifies which scroll the trajectory is currently visiting, and the moment of the next jump is sensitive to the initial condition.

What you are looking at

Chua's circuit is widely regarded as the simplest autonomous electronic circuit known to produce chaos: just one inductor, two capacitors, one resistor, and one nonlinear element (the piecewise-linear “Chua diode”), with no external driving signal. “Simplest” here is the standard characterization from the circuit's originators rather than a proof of minimality. What actually makes it canonical is that its chaos was rigorously proven (Chua, Komuro & Matsumoto, 1986), which at the time had not been done for the Lorenz system (the famous three-equation atmospheric-convection model from 1963, the original textbook example of chaotic dynamics). The piecewise-linear nonlinearity was chosen deliberately so that the return maps could be written in closed form and the proof carried out. Its state vector obeys

dx/dt = α ( y - x - h(x) ) dy/dt = x - y + z dz/dt = -β y h(x) = m₁·x + ½(m₀ - m₁)(|x+1| - |x-1|)

The nonlinearity h(x) is piecewise linear with three segments. Each outer segment hosts an unstable equilibrium with a complex pair of eigenvalues (spiral → outward) plus a real eigenvalue (stretching toward the center). The trajectory spirals outward until the stretching direction throws it across the central saddle; once on the other outer segment, the geometry repeats with mirrored signs. Each of those tightly wound bundles of outward-spiraling loops around an equilibrium is what is called a scroll (the name comes from the visual resemblance to a rolled-up paper scroll seen edge on); the Chua attractor visits two of them, hence double-scroll.

The defaults reproduce the classical double-scroll. Push α down and you collapse to a limit cycle on one side; push it up and the spiraling tightens. The number of scrolls stays at two because h(x) has just three slopes (the next tab tiles a whole plane with scrolls).

Scroll grid attractor (colored by current cell)

Two staircase nonlinearities, f₁(x) and f₂(y), tile the (x, y) plane with scroll cells: one scroll per lattice point (orange squares). The trajectory is colored by which cell it is currently visiting, revealing the slow-fast structure: long dwells inside one scroll, brief hops between neighbors, and occasional runs across several cells at once. Setting scrolls in y to 1 switches off f₂ and degenerates the grid into the classic 1D scroll chain.

Controls

grid:

Time series overlay any subset of x(t), y(t), z(t)

For the grid system, x(t) and y(t) are step-like: each plateau level is (close to) an integer that identifies the current column and row, so the dwell-then-jump structure is explicit. z(t) is the fast variable that drives the switching. With scrolls in y set to 1, y(t) stays near zero (no row structure).

The deterministic Lévy analogy

A Lévy flight is a random walk whose step lengths are drawn from a heavy-tailed distribution: most steps are small (intensive local search), but occasionally a single step is enormous (long-range relocation). The classical use is foraging theory (e.g., predators searching sparsely distributed prey, animals tracking patches that move on multiple scales).

A scroll grid attractor produces a qualitatively similar trace through phase space:

  • Inside a cell, the trajectory winds around its scroll (many small displacements).
  • The unstable stretching direction eventually carries it across a switching surface into another cell (a single large displacement), sometimes sweeping across several cells before it is recaptured.
  • Which cell it lands in, and how far the excursion runs, is set by where on the unstable manifold the trajectory happens to be at the crossing (a sensitive function of state). With a 2D grid the jumps have direction as well as length: horizontal, vertical, and diagonal hops all occur.

Crucially, there is no random number generator anywhere in the equations. The apparent randomness, including the heavy tail of the jump distribution, is generated entirely by the geometry of stretching and folding in a low-dimensional ODE.

Inter-cell jump distance, deterministic vs Lévy

Each bar counts cell-to-cell crossings by the planar displacement |Δ(x,y)| between consecutive crossings. The empirical distribution (navy) is overlaid with a half-normal fit (gray) and a heavy-tailed reference (half-Cauchy, orange). The empirical tails are heavier than the half-normal: rare long runs across multiple cells occur even though the system is fully deterministic.

Staircase nonlinearities and scroll grids

The double-scroll on the previous tab strung its two scrolls along a single axis. The natural generalization is to tile a whole plane (or volume) with scrolls. The construction here follows Yalcin, Suykens, and Vandewalle's scroll grid family, a third-order autonomous system in (x, y, z) with one staircase nonlinearity per spatial axis:

dx/dt = y - f₂(y) dy/dt = z dz/dt = -a (x - f₁(x)) - a (y - f₂(y)) - a z

The two nonlinearities are instances of a single staircase template f(u; N) = Σk=1..N ½ ( sgn(u - (k - ½)) + 1 ), a sum of N unit steps. Here f₁(u) ≡ f(u; nx-1) and f₂(u) ≡ f(u; ny-1) (a third axis would add f₃(u) ≡ f(u; nz-1)).

Each staircase makes u - f(u) a sawtooth with zeros at u = 0, 1, …, N (see the insets). The equilibria of the full system are exactly the lattice points where both sawtooths vanish, so f₁ with nx-1 steps and f₂ with ny-1 steps produce an nx × ny grid of scroll cells. Locally, every cell repeats the same saddle-focus geometry; globally, the cells are stitched together by the switching surfaces of the staircases.

Setting ny = 1 turns f₂ off entirely (f₂ ≡ 0) and the system collapses to the classic 1D scroll chain. In that case y = dx/dt and z = d²x/dt², so the three equations reduce to a single scalar jerk equation d³x/dt³ = -a (x - f₁(x)) - a·dx/dt - a·d²x/dt², the same construction as the multi-scroll Chua extensions. (With f₂ active the full grid system no longer reduces to a single jerk equation, because dx/dt = y - f₂(y) is not invertible in y.) The grid is the general case; the chain is the degenerate one. Adding the third staircase f₃ in z would extend the same idea to a 3D lattice of scrolls (not implemented here).

Unlike the piecewise-linear Chua diode, the staircase construction is remarkably forgiving: with a ≈ 0.8 a single initial condition near the origin eventually visits every cell in the grid, because the cells are all dynamically connected through the switching surfaces rather than separated into disjoint basins.

Unstable is not the same as chaotic

It is tempting to think that any system whose trajectories blow up must be chaotic. It is not so. Picture the set of initial conditions as a small ball of dough sitting in state space, and let the dynamics knead it forward in time. Instability alone just inflates the dough: every point flies outward, the ball grows, but a crumb that started next to its neighbor stays next to that neighbor. The shape is preserved; only the scale changes.

Chaos needs something more violent: stretching and folding. The dough is pulled out into a long thin filament (stretching, so nearby crumbs are driven apart), and because the trajectory is bounded, that filament has to be folded back into the working volume over and over, like a baker making puff pastry. After enough folds, two crumbs that began as immediate neighbors can end up on opposite sides of the attractor. The folding is what scrambles the topology of the initial set, and it is exactly what a linear system cannot do, no matter how unstable it is.

For a continuous-time autonomous ODE (no delays, no external forcing), this requires at least three state dimensions. The argument is topological. In a smooth ODE two trajectories cannot cross (uniqueness of solutions), so any closed loop a trajectory traces in two dimensions divides the plane into a fixed inside and outside it cannot escape. A bounded planar trajectory therefore has nowhere to go but a fixed point or a periodic orbit (Poincaré-Bendixson). A third dimension is what lets the stretched filament pass over or under itself, folding back into the bounded region without crossing its own past. In contrast, discrete-time maps and time-delay systems escape this constraint by not being continuous flows in finite dimension; for example, the logistic map exhibits chaos in one variable because it is a discrete-time system that can “jump” as opposed to flow smoothly through space.

This tab makes the distinction concrete with a deliberately boring example: a 3D linear unstable spiral. Its trajectories grow without bound, yet it is not chaotic, because there is no folding. The attractors that do fold (and therefore are chaotic) you have already seen on the first two tabs: the double-scroll and the scroll grids. Here we isolate the stretching half so the missing ingredient is obvious.

The Lyapunov exponent, in one idea

To measure stretching, track two trajectories that start a tiny distance δ₀ apart and watch how their separation δ(t) evolves. The (largest) Lyapunov exponent λ is the long-time average rate of that growth, λ = lim (1/t) ln[δ(t)/δ₀], equivalently δ(t) ≈ δ₀ eλt. Every system has such a rate, and its sign is what matters: λ > 0 means neighbors pull apart (sensitive dependence on initial conditions), λ = 0 means they drift apart slower than any exponential, and λ < 0 means they converge (a stable system). So λ is a single number that characterizes any system; the question is only its sign and size.

Here is the subtlety that separates instability from chaos. The unstable spiral also has a positive exponent, so a positive λ is necessary but not sufficient for chaos. The deciding question is what happens to the separation relative to the size of the orbit. On the spiral the whole orbit inflates at the same rate as the separation, so two neighbors stay proportionally as close as they started (the dough inflates without being scrambled). On a chaotic attractor the orbit stays bounded while the separation keeps growing until it saturates at the attractor's own diameter (the neighbors are flung apart and folded into unrelated parts of the set). The two panels below show this directly: each runs a pair of trajectories from nearly-identical starts and tracks their separation underneath.

An n-dimensional ODE actually has n Lyapunov exponents, one per independent direction (the full Lyapunov spectrum); we are tracking only the largest here. As noted above, chaos for a continuous-time autonomous system requires at least three state dimensions. The next tab looks at the full spectrum and at hyperchaos, which needs at least four dimensions because it demands two positive exponents at once.

Unstable spiral (linear: stretch, no fold)

Two trajectories from starts δ₀ = 10−3 apart (navy and orange). The hollow dot marks the shared start (δ₀); the filled dots mark the two endpoints (δt). Both trajectories spiral outward together, the gap between them grows in absolute terms but the two strands stay side by side. Toggle each trajectory to confirm there are two, and drag to rotate.
dx/dt = λ x − ω y dy/dt = ω x + λ y dz/dt = μ z λ = 0.05, ω = 2.0, μ = 0.08

Separation δ(t)

Solid: absolute separation δ(t). Dashed: separation relative to orbit size, δ(t)/|state|. The absolute gap grows (positive λ), but the relative gap stays flat: neighbors are never scrambled.

Chua double-scroll (chaotic: stretch + fold)

The same experiment on the chaotic attractor from tab 1, again starting δ₀ = 10−3 apart. The two trajectories track each other for a while, then a fold near the origin throws them onto different scrolls and they decorrelate completely (δt spans the whole attractor). Toggle each trajectory to confirm there are two, and drag to rotate.
dx/dt = α ( y − x − h(x) ) dy/dt = x − y + z dz/dt = −β y h(x) = m₁ x + ½(m₀ − m₁)( |x+1| − |x−1| ) α = 10, β = 100/7, m₀ = −8/7, m₁ = −5/7

Separation δ(t)

Same axes as the spiral. Here the relative separation climbs by orders of magnitude and saturates near 1: the two neighbors end up a whole attractor apart. That saturating climb, not mere growth, is the signature of chaos.

Stretching is cheap; folding is the hard part

Both systems stretch, both have a positive largest Lyapunov exponent, so both pull nearby trajectories apart exponentially at first. The difference is entirely in the fold. The spiral is linear: a small blob of states grows in volume at every instant and never shrinks. (The rate at which a flow expands or contracts volume is the divergence of the vector field, div(f) = ∂f₁/∂x + ∂f₂/∂y + ∂f₃/∂z; for the spiral it is the constant 2λ + μ > 0, i.e. always expanding.) The trajectory therefore escapes to infinity, there is no attractor, and nothing ever re-mixes. The two strands just inflate together.

Chua's piecewise-linear nonlinearity supplies the fold: each time a runaway trajectory crosses a breakpoint it is re-injected toward the other scroll, which keeps the motion bounded and, in doing so, repeatedly slices and stacks the stretched material. That is what lets two immediate neighbors finish on opposite sides of the attractor. Stretching alone (the spiral) gives sensitive growth without scrambling; stretching plus folding (Chua) gives chaos. The scroll grids on tab 2 are the same story with more folds.

What hyperchaos is, and what to look for

Chaos means sensitive dependence on initial conditions: nearby trajectories separate exponentially, but only along one direction. Formally, the largest Lyapunov exponent (the average exponential rate at which a perturbation grows) is positive, and exactly one exponent is positive. Hyperchaos is the stronger condition that two or more Lyapunov exponents are positive: the trajectory is being stretched in several independent directions at once. It is a special case of chaos, not a separate phenomenon, and it requires at least four state variables for a continuous-time autonomous system (the reason is the dimension budget explained below).

The system below is 4D with a single knob r. As r increases from negative values toward zero, a second Lyapunov exponent crosses from negative to positive and the dynamics change from chaotic to hyperchaotic. What to look for in the attractor: in the chaotic regime it is essentially a thin sheet, a thickened loop that nearly closes on itself, because one unstable direction can only smear the orbit out so far. In the hyperchaotic regime it becomes a fat cloud filling a genuinely two-dimensional region, because the second unstable direction spreads the orbit across an extra dimension. Use the presets to snap between the two regimes, or sweep r to watch the transition.

Right at the boundary, near r ≈ −0.32, the second exponent is approximately zero. A zero exponent is a neutral direction: on average it neither stretches nor contracts. The attractor there looks like the chaotic sheet being slowly extruded along that marginal direction, elongated but not yet filled out into a cloud. This is the onset of hyperchaos (the λ₂ = 0 crossing), not a separate named regime, but a recognizable intermediate state. The “Onset” preset parks the system right at it; nudging r a little either way tips the second exponent negative (back to a sheet) or clearly positive (into a cloud).

3D projection of the 4D Chen system (hyperchaotic, r = 0)

Projection shown in (x, z, w); drag to rotate. Thin ribbon = chaos (one unstable direction); thick filled cloud = hyperchaos (two unstable directions).

The system

The 4D hyperchaotic Chen system, introduced by Li, Tang & Chen (2005) by adding the fourth equation as a state-feedback extension of the classic 3D Chen attractor. The term r·w feeds the w channel back on itself; tuning r moves the second Lyapunov exponent through zero, switching the system between chaos and hyperchaos.

dx/dt = a (y - x) + w dy/dt = d x - x z + c y dz/dt = x y - b z dw/dt = y z + r w

Controls

regime:
The other parameters are held fixed at a = 35, b = 3, c = 12, d = 7. Moving r re-initializes the Lyapunov estimate below, since changing the parameter changes the attractor (and therefore its spectrum). The second exponent crosses zero near r ≈ −0.32: that is the onset of hyperchaos.

Time series

All four state variables. x, y, z share the left axis; w uses the right axis because it swings much wider. As r crosses into the hyperchaotic regime, w's excursions grow and turn more erratic, the visible signature of the feedback term driving the second unstable direction.

Lyapunov spectrum (Benettin/QR, running estimate)

Bars show the running estimate of each Lyapunov exponent (LE), computed as a time-average of the tangent-space stretching with periodic Gram-Schmidt re-orthogonalization. The estimate converges as the simulation accumulates time, then auto-freezes; the last digit keeps fluctuating because the average converges slowly on a chaotic attractor (the motion is the estimator settling, not the dynamics changing). Count the orange (positive) bars: one in the chaotic regime, two in the hyperchaotic regime. The single large negative exponent (strong contraction) pegs its bar; that is expected and is what keeps the attractor bounded.

Reading the bars. Orange means positive (expansion), navy means negative (contraction). A trajectory on a strange attractor must satisfy Σ λi < 0 (the attractor has zero volume), so positive LEs are always offset by sufficiently negative ones.

Is a positive exponent “big enough”? Any λ > 0 already means exponential separation; the size just sets the timescale (1/λ is roughly how long until a gap grows by a factor e). The reason the orbit does not run off to infinity, as the unstable spiral on the previous tab does, is the sum. The current estimate is (…), giving Σλi: the one huge negative exponent dominates the sum, so a blob of states loses volume fast overall even while it is stretched along its positive direction(s). That strong net contraction is exactly what folds the stretched material back and keeps the orbit a fixed, bounded size, so a growing δ(t) can only spread within the attractor, never escape it.

Reading a spectrum at a glance. A short checklist tells you what kind of system you have, without simulating it any further. Check boundedness first, because a positive exponent only means chaos once the motion is trapped on an attractor:

  • Negative sum (Σλi < 0) → dissipative: volumes shrink, so the motion settles onto a bounded attractor. A non-negative sum means volumes do not shrink and the orbit is unbounded, no attractor at all.
  • Exactly one zero LE (the flow direction) confirms the attractor is more than a single point.
  • Given a negative sum, at least one positive LE → chaotic (two or more → hyperchaotic); no positive LE → not chaotic. A positive LE without a negative sum is mere instability, not chaos.

By that test, a stable focus has a spectrum like (−, −, −) (sum negative, but no positive LE): it spirals in to a point. A limit cycle reads (0, −, −): bounded, one neutral direction around the loop, no stretching. The unstable spiral from the previous tab has (+, +, +) with a positive sum: it has positive exponents but fails the boundedness test, so it stretches without folding, stays unbounded, and is not chaotic despite all those plus signs. Only the combination “negative sum and a positive LE” signals a chaotic attractor, which is exactly the pattern in the bars above.

“Hyper” is a subset. Hyperchaos is just chaos with at least two positive LEs. It implies more independent unstable directions, denser orbits, and generally requires n ≥ 4 dimensions for a continuous-time autonomous system.

Why dimension matters

For a continuous-time autonomous dissipative ODE (no delays, no external forcing), chaos requires at least three state dimensions and hyperchaos at least four. The reason follows from the structure of the Lyapunov spectrum: such a system must include at least one zero exponent (the flow direction), and the trace of the Jacobian (= sum of LEs) must be negative for the orbit to be bounded. That forces a budget:

  • 3D chaos: (+, 0, −), one expanding direction; the minimum embedding for chaos.
  • 3D hyperchaos is impossible: it would need (+, +, 0, …), but there is no fourth slot for a sufficiently negative LE to keep the sum negative.
  • 4D hyperchaos: (+, +, 0, −), the minimum embedding for hyperchaos.

This is why the system above is 4D. The scroll systems on the earlier tabs are 3D and therefore chaotic but never hyperchaotic. Hyperchaotic systems are of practical interest in cryptography, because two independent unstable directions make a recorded signal much harder to reconstruct or predict than an ordinary chaotic one.

These bounds are specific to autonomous continuous-time flows. Discrete-time maps escape them (the logistic map is chaotic in one variable), and time-delay equations are infinite-dimensional even when written in one nominal state, so they too can be chaotic or hyperchaotic at lower apparent dimension. The rule above is the right one for the ODE systems this widget shows.

Example: using chaos to encrypt an image

Images are an awkward fit for standard ciphers like AES or RSA. They are bulky (millions of bytes), and, more importantly, adjacent pixels are strongly correlated and only a handful of color values usually dominate. A block cipher run in a naive mode can leave that spatial structure faintly visible in the ciphertext, and the sheer volume makes per-block public-key encryption slow. Chaos-based image ciphers were proposed as a lightweight alternative tailored to exactly these properties: a chaotic system is cheap to iterate, intrinsically sensitive to its starting condition, and produces a long aperiodic stream from a tiny key, which lines up neatly with the two things image encryption needs: scrambling pixel positions (to destroy spatial correlation) and masking pixel values (to flatten the histogram).

The scheme demonstrated on this tab is a standard two-stage construction. The key is the initial condition (x₀, y₀, z₀) of a chaotic system (Chua's circuit here); the equations themselves are public. The recipe runs in three steps:

  1. Iterate the chaotic system from the key to generate 2N samples, where N = width × height.
  2. Permute (confusion): from the first N samples, sort indices on the chaotic values to build a permutation P, and apply it to scramble pixel positions.
  3. Mask (diffusion): from the next N samples, derive a byte stream and XOR it into the (already permuted) pixel values, flattening the histogram.

Decryption is the same recipe run backward: XOR with the identical byte stream (XOR is self-inverse), then apply P−1. Because both parties can regenerate the entire stream from the shared key and equations, nothing but the key and the equations ever needs to be exchanged. With the correct key the two passes cancel exactly; with even a slightly wrong key the chaotic sequence diverges within a few iterations and the output stays noise. Try it below: encrypt an image, then nudge the decryption key offset and watch recovery fail.

This demo uses a plain double-scroll Chua circuit for clarity, but the earlier tabs point at why the same construction is usually built on something richer. A multi-scroll or scroll-grid system (tabs 1–2) has many more equilibria and a larger, more intricate roaming region, which widens the key space and makes the generated stream's statistics harder to fingerprint. A hyperchaotic system (tab 4) stretches along two or more independent directions at once, so its time series is broadband in more dimensions and an eavesdropper trying to reconstruct the generator from a captured sequence faces a much harder estimation problem. In short, more scrolls buys a bigger, more uniform state space to draw from, and hyperchaos buys resistance to reconstruction; practical chaotic ciphers reach for both, which is why those ideas precede this application in the widget.

One honest caveat worth keeping in mind while exploring: schemes of this family have no proof of security in the modern cryptographic sense. They are heuristic constructions that lean on the chaotic system's sensitivity and ergodicity, and several published chaotic image ciphers have later been broken by chosen-plaintext and statistical attacks. They illustrate the confusion/diffusion principle vividly but are not a substitute for vetted cryptography when protecting real secrets.

Plain image

96 × 96 synthetic, strong autocorrelation

Plain histogram

Per-channel counts (R, G, B overlaid). Spiky: a few intensities dominate each channel.

Encrypted

Permute pixels + XOR with chaotic stream

Cipher histogram

All three channels near-uniform and overlapping: first-order statistics flattened.

Decrypted

Same key as encryption: perfect recovery

Key

Add Δ to x0 when decrypting. Left edge (0) uses the correct key; moving right increases the offset from 10−12 up to 10−1.

Confusion and diffusion, in the histograms

Each histogram is the standard image histogram: for every intensity level (0 to 255 on the horizontal axis) it counts how many pixels have that value, plotted separately for the red, green, and blue channels. The plain image's histogram is spiky, a few intensities dominate each channel, which is exactly the statistical fingerprint an attacker exploits. After encryption the cipher histogram is nearly flat, the signature of good diffusion (every intensity roughly equally likely in every channel). A flat intensity histogram is the image-domain version of a white, featureless distribution: the cipher's first-order statistics carry no information about the plaintext. The scrambled appearance of the cipher image itself is the confusion stage: the permutation has destroyed the spatial correlation between neighboring pixels.

The key's sensitivity to initial conditions is the whole game. A change in (x₀, y₀, z₀) smaller than one part in 1010 already produces a completely different chaotic sequence after a few hundred iterates, so a near-miss key recovers noise rather than an approximate image. The decryption key offset slider makes this concrete: even the smallest nonzero offset destroys recovery.

© 2026 Theodore P. Pavlic · MIT License