DOMINIC SIMPSON

DOMINIC SIMPSON

The Fibonacci Sequence

Sunflower visualisation images

 

View GitHub repository

Maths is all around us. We see it every day. And yet most of the time, we barely notice it.

For this project, I have focused on the Fibonacci sequence – a mathematical sequence in which each element is the sum of the two numbers that preceded it.

Fibonacci sequence visualised in squares

Fibonacci sequence visualised in squares (source)

Named after the Italian mathematician Leonardo of Pisa – aka Fibonacci – who introduced the sequence to European mathematics in 1202, the concept of the Fibonacci sequence has existed as early as 200 BC, emerging in Indian poetry and Sanskrit prosody by the likes of Pingala and Virahanka, rather than in numerical or geometric contexts. It then appears in the Islamic World with the Persian mathematician Al-Khwarizmi (9th century) and Arab mathematician Al-Samawal (12th century). Interestingly, the word algorithm is a derivation of the former’s name – and indeed, while the Fibonacci sequence itself is a mathematical sequence, it can be seen as an algorithm in the sense that computing the sequence using a set of steps (e.g., recursive, iterative, dynamic programming) is an algorithm.

Fibonacci numbers are strongly related to the Golden Ratio, a mathematical concept where the ratio of two consecutive Fibonacci numbers approaches the ratio of their sum to the larger of the two numbers. The larger the Fibonacci numbers, the closer their ratio gets to the Golden Ratio (ϕ1.618). The Golden Ratio is visually represented by the Golden Rectangle, which likewise has the property Width ÷ Height =ϕ=1.618. The Fibonacci spiral, meanwhile, is an approximation of the Golden Spiral – a logarithmic spiral whose growth factor is the Golden Ratio – that can be seen by drawing circular arcs that connect the opposite corners of squares on top of the Fibonacci visual tiling shown in the previous image.

The Fibonacci spiral

The Fibonacci spiral (source)

From here, the Fibonacci Sequence, the Golden Ratio, and the Golden Spiral can be linked to Chaos Theory and the Mandelbrot Set, with the latter a fractal where self-replication structures occur infinitely. This self-replicating nature mirrors the growth seen in Fibonacci sequences. In the famous image below of the Mandelbrot Set, you can zoom in infinitely, with each iteration count in its branching patterns a Fibonacci-like sequence.

Mandelbrot Set sequence animated

Mandelbrot Set sequence animated (source)

Both Fibonacci spirals and the Mandelbrot set involve self-similarity – a fundamental feature of fractals and chaos theory, in which a pattern builds on itself to replicate itself at different magnifications – and the principle that Fibonacci-based growth follows a recursive rule (in which each new value depending on the sum of previous values) is similar to the recursive functions used in chaos theory. Moreover, the logarithmic spiral mentioned earlier appears in turbulence, fluid dynamics, and chaotic systems, in which small changes in initial conditions can lead to vastly different outcomes on a macro level (the Butterfly Effect and Lorenz attractors).

Returning to the origins of the Fibonacci sequence, it was through Islamic scholars that ultimately, the concept of the Fibonacci sequence would transmit to Europe, where Fibonacci used it to model rabbit population growth. It became obvious that the Fibonacci sequence appears all around us, with Johannes Kepler (1571-1630) pointing out the presence of the sequence in nature, alongside its appearance in art, music, and architecture. The Hungarian composer Béla Bartók (1881–1945) used the sequence to structure musical form, rhythmic patterns, phrase lengths, and dynamic climaxes, such as with Music for Strings, Percussion, and Celesta (1936). The total number of measures (89) and sectional divisions in the piece are Fibonacci numbers; in addition, the xylophone solo in the third moment (no classical piece is complete without a xylophone solo) is structured around Fibonacci proportions.

 

Just as with music, many visual artists also used the Golden Ratio, with Leonardo da Vinci’s The Last Supper (1495-1498) divided according to Golden Ratio proportions; Jesus, at the centre, is positioned at the Golden Section. In Michelangelo’s The Creation of Adam (1511-1512) in the Sistine Chapel, meanwhile, the point where God’s and Adam’s fingers touch align with the Golden Ratio, while the overall proportions of the ceiling frescoes follow Fibonacci-based layouts.

Then there’s M.C. Escher (1898-1972). I grew up obsessed with a book that showed Escher’s most well-known artwork and was confounded and hypnotised by the optical illusions and impossible constructions. As it turns out, the geometric illusions that he conjured up used the Fibonacci sequence.

Ascending and Descending by M.C. Escher

Ascending and Descending by M.C. Escher (Copyright M.C. Escher Foundation – source)

In architecture, meanwhile, the sequence appears in everything from the ancient (The Parthenon in Greece, with its column spacing and proportional relationships, as well as façade dimensions closely aligning to the Golden Ratio) to the modern, such as Le Corbusier’s Modulor system. Moreover, the height of buildings and room proportions devised by the latter followed Fibonacci ratios.

The explosion of film and photography in the 20th century, meanwhile, included the “Rule of Thirds” adopting a simplified version of the Golden Ratio, which Stanley Kubrick would employ in his masterpiece 2001: A Space Odyssey. In that film, the symmetry and spiral structures follow Fibonacci proportions.

Following this, it should come as no surprise that in the 21st century, the sequence is also embedded in computer science and various programming languages, particularly in the era of the rise of personal computers and laptops, including the concept of Fibonacci coding.

Were all these musicians, artists, architects, filmmakers, etc., consciously aware that they were using Fibonacci proportions, or did they use them unconsciously, by intuition, because the patterns naturally created balance and harmony? It’s likely that some very much were aware, while others were not, and were instead following aesthetic instincts.

In any case, it’s the natural and animal worlds where the magic of the Fibonacci sequence really takes hold. In nature, the logarithmic spirals mentioned earlier appear in everything from a vast scale (galaxies) to the large (lightning, hurricanes, river networks) to the small (seashells on a shore). In the animal and insects world, you can see the sequence in everything from spiral growth in animal horns and tusks, to the ancestry of bees following the Fibonacci pattern: male bees (drones) have one parent (a queen), while female bees (workers or queens) have two (a queen and a drone), resulting in a Fibonacci-like structure when tracing back generations. But it’s this spiral that I have really tried to capture in my first basic visualisation using Matplotlib, limited to just fifteen Fibonacci numbers – though the actual numbers are not shown – which illustrates how the final number increases in every counterclockwise iteration of the spiral:

Basic Fibonacci spiral visualisation

In the plant world, meanwhile, you can see it in the branching of trees to the scales of a pineapple, cacti, and pinecones. You can also see in the arrangement of leaves on a stem – such as with sunflowers. And given the beauty of the latter, a symbol of sunshine, it is the distribution of the sequence in sunflowers that I have tried to catch with my next two colourful visualisations using Matplotlib. My first below follows the Fibonacci sequence; but just as with the previous visual, it doesn’t include the actual numbers. There are 233 seeds in this plot – a Fibonacci number that aligns with the natural growth of large sunflowers.

Sunflower visualisation without Fibonacci number labels

Finally, the same image is expanded to display each Fibonacci number this time, corresponding to each seed. As you can see, 233 seeds in the Fibonacci sequence leads to some exceedingly large numbers, which are difficult to really display coherently, as the numbers blur into each other. For the numbers not to blur into each other, a vastly larger canvas would be required.

Sunflower visualisation with Fibonacci number labels

Once again, why does the Fibonacci sequence apply so much in the world around us? After all, it’s unlikely that a bee or sunflower is actively, consciously aware that they are part of the Fibonacci sequence. The answer of sorts is that the Fibonacci sequence reflects the most efficient way to distribute or grow in a confined space. It helps optimise resource allocation – such as sunlight or the distribution of nutrients – which is why it frequently appears in living organisms. It doesn’t always appear – the honeycomb structure produced by bees, to take an example, is not directly based on the Fibonacci sequence (though the reproductive patterns of bees do, as mentioned above), but instead is made up of tessellating hexagonal cells. Likewise, ant lairs, with their underground tunnels connecting various chambers. But what these do share with the Fibonacci sequence are the principles of natural optimisation, accessibility, resource allocation, and efficiency.

The Fibonacci sequence is a mathematical representation of balance and harmony in nature. Its beauty appears to us time and time again, often in breathtaking ways. To go back to where this portfolio item started, maths is all around us. We see it every day. And yet most of the time, we barely notice it.