This post shows how fractals occur naturally in broccoli, one of my favourite vegetables.

Mathy broccoli

This post is about showing you how mathematics is beautiful and how it occurs naturally in the world around us. In two previous posts (here and here), I talked about fractals. Today, I am going to do the same thing — except now, I will use broccoli as the example instead of some weird set on the complex plane!

Here's an image with two broccoli poorly edited into the image:

An image with two broccoli poorly edited into a white background.
Two broccoli.

Which one is bigger? There are only two possible answers:

  1. Exhibit A is bigger.
  2. Exhibit B is smaller.

Right? WRONG! Don't be fooled like Joey! Options 1 and 2 are the same...

Going back to the matter at hand, which one is bigger? The right answer is exhibit A, but I don't really expect you to get that. The actual question is: how much bigger is A compared to B?

In fact, B was "removed" from inside A! But they both look like perfectly fine broccoli, right? This is one of the properties of fractals: self-similarity. Fractals usually exhibit this very interesting behavior: you keep zooming in, and the things you see while you zoom in still look like the original one! (For example, in this video, we are zooming in on the Mandelbrot set; by second 13, we get the same shape with which we started!)

I'll show you the two pictures again, but this time without the background removed—you can use it to get a relative scale of the two images.

The same two broccoli, but this time you can see the texture of the surface they were laid on, showing that taking a picture of broccoli B required zooming in significantly, when compared to broccoli A.
Same broccoli and the surface background.

This self-similarity can also be seen from a recursive point of view, by which I would define broccoli this way:

Broccoli: a green vegetable composed of a stalk and smaller broccoli.

If you take a moment to think about it, this is exactly what is going on! Broccoli is the vegetable that has smaller versions of itself on top of a stalk.

Of course, I went even further, and from within B, I removed this:

A photo of a tiny piece of broccoli.
A tiny piece of broccoli.

At this point, everything is so small that Mother Nature never bothered to finish up the details, so there isn’t much more zooming I could do.

Now let us zoom out. I started out with this:

A picture of a regular supermarket broccoli.
An average supermarket broccoli.

Then I extracted exhibit A, then I got exhibit B from it, and from it, I got Broccoli Jr. Jr. Jr..

As a final image, I outlined the self-similar pattern of broccoli. Next time you eat broccoli, take the time to appreciate the fractals you are eating!

The same broccoli from the side, with successive stems highlighting the self-similarity of broccoli.
Self-similarity in broccoli.

Become a better Python 🐍 developer 🚀

+35 chapters. +400 pages. Hundreds of examples. Over 30,000 readers!

My book “Pydon'ts” teaches you how to write elegant, expressive, and Pythonic code, to help you become a better developer. >>> Download it here 🐍🚀.

Previous Post Next Post

Blog Comments powered by Disqus.