Fibonacci Spiral JavaScript Simulation Applet HTML5

The Fibonacci numbers are a sequence of integers as follows:

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, ...

where they all satisfy the recurrence relation:

{\displaystyle F_{n}=F_{n-1}+F_{n-2},}
where
{\displaystyle F_{0}=0,\;F_{1}=1.}

This sequence of numbers, interestingly, also shows up in nature, one of them being in the form of the Fibonacci spirals (found in places like the florets on the heads of sunflowers).

A Fibonacci spiral from the simulation
Now, while the number sequence may not be immediately obvious, the Fibonacci sequence appears when one counts the number of spirals in any given annulus in the shape, making sure to count the spirals going both clockwise and anti-clockwise.

Take, for example, the spirals all the way on the exterior of the spiral (the cyan part). Both the number of spirals that curve anti-clockwise facing outwards (21) and the number of spirals that curve clockwise facing outwards (34) are the 8th and 9th Fibonacci numbers respectively. Additionally, counting the number of spirals that cut through the intersections of both curves gives 55, the 10th Fibonacci number.

In this simulation (link here), the number of points n can be adjusted with either the slider or the field provided. Similarly, the size of the points can be adjusted with another slider/field pair.

The numbers on the points corresponding to the sequence in which they are generated can be toggled on and off using the checkbox on the top left (labelled number), and a table showing the coordinates of each point can also be toggled with the checkbox beside it (labelled table).



Do play around with the simulation to try to find the Fibonacci numbers hiding within!
Next Post Previous Post
No Comment
Add Comment
comment url