Learning Scientific Programming with Python (2nd edition)

P3.3.3: The sunflower seedhead

Question P3.3.3

The seedhead of a sunflower may be modelled as follows. Number the $n$ seeds $s=1,2,\cdots,n$ and place each seed a distance $r = \sqrt{s}$ from the origin, rotated $\theta = 2\pi s / \phi$ from the $x$ axis, where $\phi$ is some constant. The choice nature makes for $\phi$ is the golden ratio, $\phi = (1+\sqrt{5})/2$, which maximises the packing efficiency of the seeds as the seedhead grows.

Write a Python program to plot a model sunflower seedhead. Hint: Use polar coordinates.