Drawing Fibonacci Spiral using Python
Let's get this clear. I do NOT understand the math behind this code. I was assigned to write a code to draw a regular polygon using Python Turtle Graphics, and I decided to play with the code after the task was done. I added in a simple iterative function which would draw a polygon with n sides, then shift to the next edge in the same polygon (from the edge that the drawing started) and then move on to draw a polygon with n+1 sides. To my amazement, I spotted a beautiful Fibonacci Spiral forming in the plot.
For those who don't know, Fibonacci spiral is famous for it's mathematical perfection, aesthetic appeal and biological importance. The Fibonacci spiral and the golden ratio (phi) is interconnected, which creates the same spiral that exists and sunflowers and which shapes spiral galaxies. The Fibonacci Spiral is EVERYWHERE in the universe!
Click here for the full code! >>>>>
Comments
Post a Comment