Barnsley Fern

A nearly realistic fern, born from just four mathematical rules

If I told you that the fern below isn't a photograph or a hand-drawn image, but was generated by computer calculations, would you believe it?

It relies on no leaf models, branch models, or plant growth animations; instead, it simply repeats a few basic mathematical rules to eventually 'grow' the plant we see.

This is the Barnsley Fern—one of the most classic creations in the world of fractals.

Upon first seeing it, one might mistake it for a botanical illustration rather than a mathematical figure.

In fact, it demonstrates something remarkable: complex natural forms do not necessarily require complex rules.

How does it 'grow'?

The process of generating the Barnsley fern is far simpler than many imagine.

Starting from a single point, the computer randomly selects a 'growth rule' at each step: sometimes growing slightly to the left, sometimes curving to the right, sometimes sprouting a new frond, and sometimes extending further upward.

After tens or hundreds of thousands of repetitions, a complete fern gradually emerges.

No one tells the computer where the leaves should be, nor does anyone draw each individual branch; the plant's form arises entirely from these constantly repeated, small-scale variations.

Why does it look so realistic?

What is truly surprising is not just that it resembles a plant, but that it looks like a real-world plant.

Look closely, and you will see that each small leaflet resembles a miniature version of the larger frond, while each large frond is composed of even smaller leaflets.

This characteristic—where the whole resembles its parts—is known as a fractal.

Many real-world plants share this structure; traces of fractals can be found in ferns, snowflakes, trees, rivers, and even lightning. This is precisely why the Barnsley fern appears so natural.

The Whole and the Parts

Complete fern frond
Magnified section

Complete fern frond

Magnified section

When magnified, the section retains a shape similar to the whole.

You can explore details that exhibit self-similarity—where the parts resemble the whole—by clicking the zoom buttons at the bottom of the image above or by using your mouse wheel to zoom in and out.

It All Starts with 'Randomness'

When many people first encounter the Barnsley fern, they assume the computer is drawing the entire plant bit by bit in a fixed sequence.

In reality, that is not the case.

At each step, the computer randomly selects the next rule to apply. However, this 'randomness' isn't completely arbitrary; each rule has a specific probability of being chosen.

For instance, some rules are executed at almost every step, while others appear only occasionally; a few specific rules are responsible for generating tiny leaf stalks and branches.

It is the combination of these varying probabilities that shapes the plant's overall appearance. This is why it is often described as **order within randomness**.

The defining concept of the Barnsley fern is this: **it doesn't draw the plant directly; instead, it defines how the plant grows**.

The computer has no concept of what a leaf or a branch is; it simply repeats the same set of rules over and over again.

Remarkably, this simple process naturally gives rise to a plant that looks incredibly realistic. This is precisely what makes fractal geometry so fascinating.

Try Out Different Ferns

By altering the rules, you can generate plants with different styles—some slender, others dense; some with sprawling fronds, others more compact.

You can experience these different ferns firsthand by clicking the 'Next' button at the bottom of the image above. You'll discover that while they all share the characteristics of a plant, each possesses its own unique form.

More Than Just an Image

The Barnsley fern was not created simply to draw a beautiful plant. It was introduced in the 1980s by British mathematician Michael Barnsley as part of his research into fractal geometry.

It reveals a new way of thinking: complex forms in nature do not necessarily require complex descriptions. Sometimes, a few simple rules—combined with repetition—are enough to create breathtaking structures.

This concept has since influenced not only mathematics but also fields such as computer graphics, procedural generation, and the simulation of natural scenes.

Decades after its creation, the Barnsley fern remains astonishing. It serves as a constant reminder that a seemingly complex plant—with its countless overlapping fronds and rich, natural textures—is not the product of a massive model, but rather just a few simple rules executed repeatedly.

Here, mathematics and nature meet in perfect harmony.

Continue Exploring the World of Fractals

The Barnsley fern is just one classic example from the world of fractals.

If you enjoy the process of creating complex patterns from simple rules, why not explore other fractal creations? Examples include the Mandelbrot set, the Julia set, and other fascinating mathematical shapes. Each fractal reveals unique patterns, yet they all share a common message: complexity can arise from simplicity.

Learn more about the Barnsley fern on Wikipedia

Want to see these stunning mathematical visuals every time you open a new tab? Install the Chrome extension now and set "Math Wonder Box" as your new tab page.🚀

Learn More