# Spiral seeds

Spirals and sunflowers. Common words when someone wants to show an example of how mathematics is deeply embedded in nature. But, how that really works? What’s the role of the Fibonacci series and the golden ratio in this?

Of course, there are some other examples of Fibonacci spirals in nature. But, what advantages do these spirals offer?

Well, I don’t have any of the answers, so I created a nice toy to check several types of spirals.

The mechanics are simple. Suppose you are a sunflower trying to figure out how to grow your seeds in a concentric pattern. So you spend a few million years trying out several possibilities. The simplest one is to place one seed at every turn. Very inefficient, because you end up with all of your seeds piled up in one side.

So, to improve this whole thing you grow two seeds per turn and evenly spaced.
Try this out entering `2`

, then clicking **submit**. It works a bit better, but
you are still wasting a lot of space. Any other integer will have the same
problem because you will create stars with `n`

ends for every integer `n`

.

Nota

Enter a number between

`1`

and`9`

then click**submit**to test a specific spiral number.Click

**>**to start/pause the animation.Click

**<<**to switch the direction of the animation.

Let’s now try decimals, for example, `1.05`

. The seed patterns will become
more interesting. What if we try some irrational numbers? The JavaScript applet
includes quick access buttons for \(\pi\ \sqrt{2}\ \varphi.\) The text
field lets you try any value between 1 and 9.

## Additional resources

This applet was inspired by a video posted on the Numberphile’s YouTube channel featuring Ben Sparks.

The code for the applet uses the p5.js JavaScript library. Find the source
code on this gitlab repository, inside the *seeds* subfolder.