Skip to content

๐ŸŒป Phyllotaxis

JavaScriptThree.js

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

Source

๐Ÿง  Idea inspired by this video

The spiraling flower pattern is easily generated by varying the values of merely two parameters called nn and cc, where nn counts the number of seeds/dots and cc is the so-called scaling factor, i.e. it determines how densely the seeds/dots are packed.

By varying the value of nn from one to the final number of seeds, we obtain values for (the polar coordinates) rr and ฯ•\phi with:

{ฯ•=nโ‹…137.5โˆ˜r=cn\begin{cases} \phi &= n \cdot 137.5^\circ \\ r &= c \sqrt{n} \end{cases}

where rr measures the distance of the seed/dot to the core, and ฯ•\phi the angle at which it is placed. Note the presence of the special number 137.5137.5, which is the famous golden angle!

Finally, we only have to transform the rr and ฯ•\phi values to the x,yx, y coordinates on our computer screen:

{x=rโ‹…cosโก(ฯ•)y=rโ‹…sinโก(ฯ•)\begin{cases} x &= r \cdot \cos(\phi) \\ y &= r \cdot \sin(\phi) \end{cases}