We draw each seed as a circle, characterised by 3 parameters:

- distance from the centre of sunflower
- angle from the centre of sunflower
- radius of seed (fixed)

We draw 900 seeds. Each seed *i* has a distance from centre of *sqrt(i) * radius* and has an angle from centre of *i * angleIncrement*. The angle increment is based on the decimal part of *phi*, the golden ratio. The angle increment options are:

Approximate 1 - phi by successive Fibonacci numbers ratio 55/89

Approximate 1 - phi by successive Fibonacci numbers ratio 34/55

Approximate 1 - phi by successive Fibonacci numbers ratio 21/34

The code here is just HTML 5 and javascript and was inspired by Gary Darby's http://www.delphiforfun.org/Programs/FiboSunflower.htm and Hannah Dee's CS252 HTML5 Canvas lectures. See also Description of how to count spirals in a sunflower head.