
Fractals: Nature's Secret Code
A mathematical journey between the order of chaos and the hidden geometries of the universe
by Michele Valentino
Have you ever observed the shape of a cauliflower, the profile of a coastline, or the branch of a lightning bolt and perceived an invisible order? Welcome to the world of fractals. In 'Fractals: Nature's Secret Code', Michele Valentino guides us beyond the boundaries of traditional Euclidean geometry to explore a reality made of self-similarity and infinite recursion. From the revolutionary insights of Benoit Mandelbrot to the hypnotic beauty of Julia sets, this book reveals how apparently simple mathematical formulas can generate the breathtaking complexity of the natural world. It is not just about theory: you will discover the practical applications that are transforming finance, data compression, and digital modeling. Through a clear explanation of chaos and the butterfly effect, the author provides the technical tools and algorithms to generate these incredible shapes on a computer, making mathematics a visual art. Whether you are a programmer, a science enthusiast, or simply curious about the beauty of the cosmos, this book will forever change the way you look at reality. Nature is not made of circles and triangles, but of a secret code just waiting to be decoded.
- Science & Technology
- Mathematics
- Computer Science
Beyond Euclid: The Birth of Roughness
Preface
Returning to speak of fractals, thirty-five years after the publication of my essay Viaggio nell’Universo Frattale, is like reopening a dialogue with a part of me that has never stopped observing the world through the lens of complexity.
<>In 1991, that first book was born from the desire to recount the mathematical wonder hidden in the forms of nature — a wonder that then seemed confined to laboratories and images generated by the first computers. Today, that same geometry has become language, aesthetics, even philosophy.
In these decades, my professional life has been intertwined with finance, the psychology of risk, and technology. But fractals have remained a constant: a way to understand how order can emerge from chaos, how beauty can be born from repetition and infinite variation.
Fractals, The Secret Code of Nature is not just a return, but an evolution.
It is a visual and conceptual journey that unites science and art, numbers and emotion, rigor and wonder. Every image, every reflection, is an invitation to recognize the hidden structure that binds the microcosm to the macrocosm, the human mind to the universe.
After thirty-five years, the fascination of fractals has not diminished: it has been transformed.
Today I see them not only as formulas, but as metaphors for life itself — for its unpredictability, its secret harmony, its capacity to repeat itself without ever being the same. I could say that this book is born from the same curiosity that accompanied me then, but today that curiosity has new tools, new questions, and new images. In these years I have learned that complexity is not only a mathematical concept: it is a key to reading markets, human relationships, living systems.
For this reason, I have chosen to accompany theoretical reflection with a broader visual dimension, capable of showing what words alone cannot tell. The images that make up this volume are not simple illustrations: they are maps of the invisible, traces of a deep order that runs through nature and the mind. It is in this dialogue between science and perception, between rigor and imagination, that I found the sense of returning to fractals after so many years.
When I was a boy, the first insights into artificial intelligence did not come from a computer science manual, but from the pages of the novels I read voraciously. Asimov (1920–1992), more than any other, had known how to transform scientific speculation into a coherent vision of the future: robots capable of dialoguing with humans, logical systems able to make autonomous decisions, machines that were not simple tools, but interlocutors. At the time, those ideas belonged to the territory of fiction; they were fascinating but distant hypotheses.
Today, as I write this book, I find myself interacting daily with an artificial intelligence that understands natural language, processes complex concepts, and provides answers with a naturalness that would have amazed even the most optimistic reader of the eighties. It is a historical transition that deserves to be recognized: what was once literary imagination has become an integral part of the scientific method and the creative process. It is not only technological progress, but a profound cultural change, which redefines the relationship between knowledge, tools, and human thought.
In this sense, Asimov is not just a literary reference of my youth: he is the ideal bridge between the science fiction that formed me and the reality with which I dialogue today while exploring the hidden geometry of nature.
May this reading open a door — small or large — onto a new way of observing the world.
Chapter 1 - Beyond Euclid: The Birth of Roughness
«The order of nature is born from the disorder that we cannot measure.»
«What seems like chaos is only a geometry that we have not yet understood.»
Take a ruler and measure the coast of Norway. Now use a shorter one: the length will increase. Reduce the unit of measurement again and it will grow once more. Push this process to the point of absurdity and you will find yourself before a coast of tendentially infinite length. This is not a measurement error: it is nature revealing the limits of the tools with which, for centuries, we have described the world.
This observation, known as the coastline paradox, was one of the starting points for Benot Mandelbrot (1924–2010) when, in the sixties and seventies, he began to build a completely new mathematical system. Mandelbrot was not an academic mathematician in the traditional sense: he worked at the IBM Research Center in Yorktown Heights, where he analyzed noise in data transmission signals. Yet, observing those graphs full of irregular fluctuations, he saw what his colleagues did not see: a structure that repeated itself at different scales, obstinate and precise.
To understand the scope of this intuition, one must first understand what he was calling into question.
The geometry that taught us to see the world
For over two thousand years, Euclidean geometry was the language with which human beings described and built the world. In the Elements, Euclid defined perfect objects: points, lines, planes, circles, spheres, cones, cylinders. All shared a fundamental property: smoothness. A sphere is perfectly round, a line has no thickness, a circle has an exact circumference at any scale.
This geometry worked extraordinarily well for buildings, machines, trajectories, and orbits. The problem is that the real world is not made of smooth shapes.
As Mandelbrot recalled: «Clouds are not spheres, mountains are not cones, coastlines are not circles, and bark is not smooth, nor does lightning travel in a straight line.»
Nature is irregular at all scales. And for centuries we did not have a mathematics capable of describing this irregularity.
Mandelbrot at IBM: when noise has a structure
In the sixties, IBM engineers were struggling with signals disturbed by apparently random errors. Classical statistical models failed to predict them: it was assumed they were white noise, devoid of memory.
Mandelbrot observed the same data and saw something else. He noticed that error-free periods were followed by clusters of errors, and that these clusters repeated themselves at different time scales. Zooming in on any portion of the graph, the structure remained similar to the whole. It was self-similarity.
The same pattern appeared in historical cotton price data: daily fluctuations had the same statistical structure as monthly and annual ones.
Very distant phenomena — electrical signals, financial markets, coastlines, mountains — showed the same property: a recurring geometry, not smooth, not random.
Mandelbrot had found a common thread. Now a mathematical language was needed to describe it.
Smooth versus rough
A Euclidean curve, enlarged, becomes simpler and simpler: at sufficiently small scales it is indistinguishable from a straight line. It is differentiable, its local complexity is zero.
A fractal object behaves in the opposite way: the more you enlarge it, the more details emerge. The coast of Norway, from a satellite, shows fjords; from an airplane, inlets; from the ground, rocks and cracks; under a microscope, further structures. The detail is never exhausted.
This property is called self-similarity: every part, at any scale, resembles the whole, in an identical or statistical way.
The difference is not aesthetic: it is mathematical. A smooth curve has a well-defined length. A fractal curve can have a length that grows without limit as the unit of measurement decreases.
The term that changed everything
In 1975, Mandelbrot coined the term fractal (fractus, “broken”) to describe objects whose structure is fragmented and whose dimension is not an integer.
A curve can have dimension 1.26; a surface, 2.7. These values measure how much an object “fills” space in an irregular way. The formal concept — the Hausdorff dimension — will be addressed in the next chapter.
Non-Euclidean geometries and new metrics
Fractal geometry does not belong to the tradition of nineteenth-century non-Euclidean geometries, but it shares their spirit: abandoning a hypothesis considered universal.
Classical geometry assumes that, at sufficiently small scales, every shape can be approximated by lines and planes. Nature contradicts this hypothesis.
To describe irregular objects, Euclidean metrics are inadequate:
the length of a fractal curve is not a fixed number
the area of a fractal surface can be infinite while being contained in a finite space
the border of a set can itself be a fractal
Anticipatory tools already existed — Georg Cantor (1845–1918), Giuseppe Peano (1858–1932), David Hilbert (1862–1943), Helge von Koch (1870–1924) — but they were considered pathological curiosities. Mandelbrot understood that they were models of reality.
Nature is not Euclidean
Look at a tree: the trunk divides into main branches, then into secondary branches, then into twigs, then into veins. Look at a lung: bronchi, bronchioles, alveoli. Look at a snowflake, a coastline, a galaxy.
Nature is branched, rough, self-similar. Fractal geometry is the only one capable of describing it with precision.
What it means for those who build models
The distinction between smooth and rough has concrete implications:
in video games, realistic terrains require fractal algorithms
synthetic clouds must use fractal noise
in financial markets, real fluctuations do not follow the smooth Gaussian of classical models
Understanding roughness is the difference between a model that works and one that fails in extreme situations.
The physical boundary of roughness
Mathematics allows for infinite fractals. Physics does not: the world is made of atoms.
The coast is rough down to the scale of sand grains. The lung branches down to the alveoli. Natural roughness always has a lower limit.
Yet, some theories — such as loop quantum gravity — suggest that space itself may have a granular or fractal structure at the Planck scale.
If this were so, roughness would not just be a useful model: it would be a fundamental property of reality.
The starting point
Mandelbrot did not invent roughness. Roughness had always been there, in every coastline, in every cloud, in every tree. What he invented was the way to see it, and then to measure it. He built a mathematical language in which the irregular complexity of the real world was not an anomaly to be ignored, but a property to be quantified.
This change of perspective is the starting point for everything that will follow in this book. In the subsequent chapters we will see:
how roughness is measured with the dimension of Felix Hausdorff (1868–1942)
how the most famous fractals are constructed
how to program a computer to generate them
how they appear in the physical, biological, and financial systems that surround us
For now, it is enough to have understood one thing: the world is not Euclidean. It never has been. And once you begin to see it through the lens of fractal geometry, it is impossible to go back to seeing it as before.
Exercises
1. Coastline Measurement: Take a map of a jagged coastline, for example that of Sardinia or Norway, and try to measure its length first with a 10-centimeter ruler and then with a 2-centimeter one. Note the two results. The difference you obtain is not an error: it is the first empirical demonstration that you are encountering an object with fractal properties. If you want to go deeper, repeat the measurement with a 1-centimeter ruler and plot a graph with the length obtained as a function of the length of the ruler used.
2. Hunting for Roughness: Photograph three natural objects, for example a leaf, a rock, and a cloud. For each, identify at least two different scales of observation and describe how the visible structure changes when passing from one scale to another. Then try to describe the same object using only Euclidean shapes: circles, triangles, cylinders. Note where the Euclidean description fails and where it becomes impossible. This exercise does not require mathematics: it requires observation.

Figure 1 - Imaginary fractal coastline
Image generated with the use of artificial intelligence
The Hausdorff Dimension: Measuring Irregularity
Chapter 2 - The Hausdorff Dimension: Measuring Irregularity “Infinity is not far away: it is hidden in every detail that repeats itself.” “Every curve in nature is a signature of eternity.” In 1918, while Europe sought to pull itself back together after a war that had shattered every certainty, a German m…