Math MagikDocket One
Math Magik

Chaos Theory Explorer

Visualize the Butterfly Effect.

📜 The Origins

The Lorenz Attractor and Mandelbrot Sets show that order can exist within chaos. This explorer lets you visualize the beautiful, fractaling complexity of the universe.

🚀 Master the Tool

Select a chaotic model and adjust the parameters. Watch as simple equations create infinite, self-similar patterns that mimic everything from clouds to heartbeats.

The calculator
Bifurcation Explorer
Visualizing population growth stability vs chaos (The Logistic Map).
Generations100

More points = denser graph.

Zoom Level1x

Zoom into the chaotic region (r=3.5+).

What am I looking at?

This is the "Bifurcation Diagram". As the growth rate (X-axis) increases, the population (Y-axis) splits from a single stable value into 2, then 4, then 8... until it hits Chaos (the fuzzy bands).

What the Logistic Map Actually Models

Imagine a population of fish in an isolated pond, counted once a year. Two forces pull against each other. When the pond is nearly empty, there is plenty of food and space, so the population multiplies quickly. When the pond is crowded, fish compete, starve, and breed less, so growth collapses. The logistic map is the simplest equation that captures both forces at once, and it is the engine running underneath this explorer.

You feed the model two things: a growth rate, usually called r, and a starting population expressed as a fraction of the maximum the pond can hold, from 0, empty, to 1, full. The model then tells you next year's population. Feed that answer back in, and you get the year after. Repeat thousands of times and a pattern emerges, or, past a certain point, a spectacular lack of one.

What makes this tool worth playing with is that the entire wild journey from boring stability to full chaos is controlled by a single dial. You are not changing the equation. You are only turning r.

The Route to Chaos: Period-Doubling

As you raise the growth rate, the long-term behavior of the population passes through distinct stages. The explorer lets you watch each one appear. - Growth rate roughly 1.0 to 3.0: the population settles to one steady value and stays there forever. A pond carrying capacity is reached and held. This is equilibrium. - Growth rate roughly 3.0 to 3.45: stability breaks in two. The population stops settling and instead alternates between a high year and a low year, boom and bust, forever. This split is called a bifurcation. - Growth rate roughly 3.45 to 3.54: each of those two values splits again. Now the population cycles through four different values before repeating. - Growth rate past about 3.57: the splitting has happened so many times, faster and faster, that the cycle length becomes effectively infinite. The population never repeats. This is chaos.

This cascade of splits, one becomes two, two become four, four become eight, is called period-doubling, and it is one of the most reliable roads into chaos that nature knows. If you plot the settled values for every growth rate side by side, you get the famous bifurcation diagram: a single line that forks, forks again, and finally shatters into a misty cloud of points.

The Feigenbaum Constant: A Hidden Universal Number

Here is the part that genuinely startled mathematicians. Those period-doubling splits do not happen at evenly spaced growth rates. Each new split arrives sooner than the last. The gaps between bifurcations shrink as you climb.

In the 1970s, physicist Mitchell Feigenbaum measured how fast those gaps shrink. He found that each gap is about 4.669 times smaller than the one before it. Then he checked a completely different equation. Same number. He checked another. Same number again, 4.669.

This value, now called the Feigenbaum constant, turns out to be universal. Any system that reaches chaos through period-doubling, dripping faucets, certain electronic circuits, heart rhythms, fluid convection, approaches chaos at this exact rate. It is a fundamental constant of nature in the same league as pi, hiding inside the route from order to disorder.

Order Hidden Inside the Chaos

You might expect the chaotic region past 3.57 to be a uniform smear of randomness. It is not, and this is where zooming in pays off.

Look closely and you will find sudden vertical windows of calm carved into the chaos, narrow bands of growth rate where the population snaps back into a clean, repeating cycle of three or five values, then dissolves into chaos again. The most famous is the period-3 window near a growth rate of 3.83. There is a deep theorem behind this: period three implies chaos. If a system can ever cycle through exactly three states, it is guaranteed to be capable of every other cycle length too, including the infinite one.

Zoom into any of these windows and you will see a tiny, slightly distorted copy of the entire bifurcation diagram nested inside it. This self-similarity, the whole reappearing within its own parts, is the signature of a fractal, and it is the same property that lets the related Mandelbrot Set be zoomed into forever.

Chaos is not the absence of order. It is order so intricate that no shortcut can predict it. You have to live through every step to know where it goes.

A Worked Example

Set the growth rate to 3.2 and start the population at 0.4, a pond at 40 percent capacity. Run it forward: - Year 1: 0.768 - Year 2: 0.570 - Year 3: 0.784 - Year 4: 0.541

After many years it locks into a steady oscillation between about 0.513 and 0.799. That is a stable two-cycle. Predictable. Now change only the growth rate to 3.9 and keep the same starting point of 0.4. The numbers march off with no pattern at all, never settling, never repeating.

Now do the experiment that named this whole field. Keep the rate at 3.9 but nudge the start from 0.4 to 0.4001, a difference of one part in four thousand. For the first few years the two runs track each other closely. By year fifteen or so they have nothing to do with each other. One tiny rounding difference, amplified relentlessly, has erased all agreement. That is the butterfly effect, and it is exactly what trapped meteorologist Edward Lorenz when a rounded weather input flipped his forecast from calm to storm.

How the Math Works

There is no calculus here. The logistic map is one line of plain arithmetic that you apply over and over.

In words: the next value equals the growth rate, multiplied by the current value, multiplied by 1 minus the current value.

That final piece, 1 minus the current value, is the whole trick. It is the brake. When the population is small, that term is close to one, so it barely slows growth and the population shoots up. When the population approaches the maximum of one, that term shrinks toward zero, slamming growth down. The tension between unchecked multiplication and that built-in brake is what produces every behavior in the bifurcation diagram.

To use it by hand: pick a growth rate, pick a starting value between zero and one, compute the next value, then feed that result straight back into the same rule. Do it a few hundred times and let the early numbers wash out. What remains, a single point, a short cycle, or an endless wandering line, depends entirely on that one growth-rate dial, and that is precisely what this explorer draws for you.

Pro tips
01Zoom in to see the infinite detail of a fractal.
02Small changes in 'r' values can lead to 'bifurcation', the sudden split into multiple states.
03Nature is built on fractal geometry.

The Fine Print (FAQ)

Is the Mandelbrot Set infinite?
Yes. You can zoom in forever and never find the exact same image twice, yet you will always find 'mini-Mandelbrots' (self-similarity).
Can computers predict chaos?
Only for a short time. Due to the 'Lyapunov Horizon', errors multiply exponentially. That's why weather forecasts are useless beyond 10 days.
What is the 'Feigenbaum Constant'?
4.669... It's a universal number (like Pi) that dictates how quickly systems descend into chaos, applicable to everything from fluid dynamics to animal populations.