๐ป Phyllotaxis
In botany, phyllotaxis (from Ancient Greek ฯฯฮปฮปฮฟฮฝ (phรบllon) โleafโ and ฯฮฌฮพฮนฯ (tรกxis) โarrangementโ)or phyllotaxy is the arrangement of leaves on a plant stem. Phyllotactic spirals form a distinctive class of patterns in nature. โ Wikipedia
Live demo
Section titled โLive demoโ๐ง Idea inspired by this video
Theory & implementation
Section titled โTheory & implementationโThe spiraling flower pattern is easily generated by varying the values of merely two parameters called and , where counts the number of seeds/dots and is the so-called scaling factor, i.e. it determines how densely the seeds/dots are packed.
By varying the value of from one to the final number of seeds, we obtain values for (the polar coordinates) and with:
where measures the distance of the seed/dot to the core, and the angle at which it is placed. Note the presence of the special number , which is the famous golden angle!
Finally, we only have to transform the and values to the coordinates on our computer screen: