Phyllotaxis

Phyllotaxis is a botanical term which describes the mesmerizing arrangement of leaves on an axis or stem. We can find many examples of this phenomena in nature!

Sunflower

Sunflower

Succulent

Succulent

 

I was inspired by this phenomena and a video from NYU Professor Daniel Shiffman. Based on this, I began to program a small python application which would allow me to explore the math behind this pattern by drawing dots to a canvas. A lot of the calculations involved in creating these patterns are directly related to the “golden ratio.” Two quantities are considered to be in this ratio if their ratio is the same as the ratio of their sum with the larger of the two quantities. There are two main values we are concerned with when trying to mimic this pattern. The first is the distance from the center of the canvas and the second is the angle. These values are determined by the dot order, a constant angle modifier, and a scaling factor. On the left you can see the UI I developed for this application. It includes an animate, stop, and clear button which all control the canvas action. The user has the ability to input a specific angle and scaling factor. I have also provided two different options for controlling the color of the dots. Clicking the choose color button brings up a color picker and will make all of the dots on the canvas the same selected color. But users can also dynamically alter the hue, saturation, and luminosity based on certain parameters provided by the golden ratio formulas. This gives the user the ability to make some pretty cool patterns. Finally, I added an error bar at the bottom to notify the user of any divide by zero errors. Below are some that I was able to create using my application.