HomeArticlesChaos and Dynamics

Gingerbreadman Map: A Self-Similar Fractal from Folding

Devaney's Gingerbreadman map builds a chaotic, self-similar fractal out of nothing but absolute value, addition and subtraction.

mysimulator teamUpdated June 2026≈ 6 min read▶ Open the simulation

A map built from a fold and a reflection

Robert Devaney introduced the Gingerbreadman map in the 1980s as one of the simplest possible piecewise-linear systems that still produces genuine chaos. The rule takes a point (x, y) and sends it to a new point using only absolute value, addition and subtraction:

x_next = 1 - y + |x|
y_next = x

There is no multiplication by an irrational constant, no trigonometric function, nothing that looks capable of generating complexity. The entire nonlinearity lives in the absolute value: it folds the plane along the line x = 0, and that single fold, repeated thousands of times, is enough to stretch and refold orbits into an intricate, self-similar shape that resembles a gingerbread man -- hence the name.

live demo -- click to seed a point, watch its orbit trace the invariant set● LIVE

Bounded orbits versus orbits that escape to infinity

Not every starting point produces the gingerbread figure. Points inside a specific bounded region stay bounded forever, tracing out denser and denser coverage of the fractal silhouette as the iteration count grows; points outside that region diverge to infinity, moving away faster and faster under repeated folding. The boundary between the two behaviours is itself fractal, so a point picked a hairsbreadth from the boundary can take an unpredictable number of iterations before it decides which way to go -- a direct, visual demonstration of sensitive dependence on initial conditions, the defining signature of chaos.

Piecewise-linear does not mean piecewise-simple

Because the map is linear on each of the two half-planes defined by the fold, you might expect the dynamics to be tame -- linear maps alone can only rotate, scale, and shear, never fold complexity into a bounded set. What makes the Gingerbreadman map chaotic is that the *combination* of two linear pieces, switched by the sign of x, acts as a piecewise isometry: it preserves area (the map has Jacobian determinant of magnitude 1 almost everywhere) while still mixing the plane through repeated folding. Area-preserving dynamics with a fold is exactly the recipe used by the horseshoe map in the general theory of chaos, and the Gingerbreadman is one of its most transparent concrete realisations.

Why it belongs next to Hénon and Ikeda

The Gingerbreadman map, the Hénon map and the Ikeda map are all two-dimensional discrete iterations that trade a closed-form solution for an intricate invariant set, and they make a natural trio for comparing how different nonlinearities -- absolute value versus quadratic versus trigonometric -- produce qualitatively different fractal textures from the same basic idea of stretch-and-fold. The Gingerbreadman's piecewise-linear rule makes it the easiest of the three to reason about by hand, since every trajectory segment between folds is a straight line you can compute exactly, which is why it is often the first stop for anyone learning how folding alone can generate chaos.

Frequently asked questions

Why is it called the Gingerbreadman map?

The bounded invariant set that orbits trace out, when plotted, resembles the outline of a gingerbread-man cookie -- a rounded body shape with limb-like protrusions -- which is where Robert Devaney's playful name comes from.

Is the Gingerbreadman map really chaotic if it is only made of absolute values?

Yes. Chaos requires sensitive dependence on initial conditions plus a bounded, topologically mixing invariant set, not any particular kind of nonlinearity. The absolute-value fold is enough nonlinearity to stretch and refold nearby orbits apart exponentially while keeping them trapped in a bounded region.

What happens to a point that starts outside the bounded region?

It escapes to infinity, moving away from the origin at an ever-increasing rate under repeated iteration. The boundary separating escaping points from bounded points is itself an intricate fractal curve, so points near it can wander unpredictably before their fate is decided.

Try it live

Everything above runs in your browser — open Gingerbreadman Map and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Gingerbreadman Map simulation

What did you find?

Add reproduction steps (optional)