Try now in the
Open Cloud »
(no sign-in required)

Phyllotaxis Spirals

Explore the spiral structures of daisies and sunflowers.

Run the code to draw a spiral. Try angles other than 5 degrees:

Note: to try other angles, change both occurrences of the angle.

SHOW/HIDE DETAILS

This gives the coordinates of eight points with 45° spacing around a circle (type deg to get the degree symbol (°)):

In[1]:=
X
Out[1]=

This draws the points:

In[2]:=
X
Out[2]=

Make the angle smaller and the number of points larger to get a tighter circle of points (a lot of the points overlap):

In[3]:=
X
Out[3]=

Multiply by the square root of t to make the points spiral out from the center:

In[4]:=
X
Out[4]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Make a spiral with the golden angle. Try numbers of points other than 400:

SHOW/HIDE DETAILS
Out[1]=

Plant structures like the daisy flower above are often arranged in spirals whose angle is the golden angle:

In[1]:=
X
Out[1]=

When you draw spirals with the golden angle, the points pack together evenly throughout:

In[2]:=
X
Out[2]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Make the points larger and red. Try other sizes and colors (like Blue or Orange):

SHOW/HIDE DETAILS

Make the points larger with PointSize (put multiple graphics elements in a list, indicated by curly braces):

In[1]:=
X
Out[1]=

Make the points red:

In[2]:=
X
Out[2]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Explore different angles. Drag the slider to change the angle:

Hint: press (or ) for fine control while dragging the slider; press + (or +) for even finer control.

SHOW/HIDE DETAILS

The arrangement you get with the golden angle is very sensitive to changes in the angle. Changing the angle by a tiny amount from the golden anglejust one tenth of a degree heredestroys the nice packing:

In[1]:=
X
Out[1]=

Make an interactive interface to explore angles using Manipulate.

Wrap the Graphics expression with Manipulate, replace the fixed angle ga with the variable a, and specify that a ranges from 0 to 360, with an initial value of ga. The option AppearanceLabeled puts the angle value next to the slider, so you can see how it changes as you drag the slider:

In[2]:=
X
Out[2]=

HIDE DETAILS
In[1]:=
X
Out[1]=

Add controls for the size and number of points:

SHOW/HIDE DETAILS

Replace the fixed point size .03 with the variable s and the fixed number of points 400 with n:

In[1]:=
X
Out[1]=

HIDE DETAILS
In[1]:=
X
Out[1]=