Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm want to generate a 2D spiral pattern like the the one shown in the following figure. I can generate the spirals one by one, but I think there ought to be a more efficient method for generating such a scattered point pattern. Could anybody give me a hint?

sunflower pattern

share|improve this question
I think you need to show your existing approach to be in with a chance of getting an answer to this. As it is, it's rather unclear what you expect other than for people to solve the problem for you. – Oleksandr R. Mar 9 '13 at 5:51
Mandatory reference: :-) – Mr.Wizard Mar 9 '13 at 6:25
@Mr.Wizard her videos are awesome! – chris Mar 9 '13 at 14:49
here is the original picture if someone wants to give it a try:… – shrx Dec 31 '13 at 12:45
up vote 20 down vote accepted

It is called spiral phyllotaxis pattern. There is a lot of Mathematica material for this. Chris Carlson blog give you a code right from the start:

g = 2 Pi (1 - 1/GoldenRatio);
PolarCoordinate[r_, t_] := r {Cos[t], Sin[t]};
Graphics[Point[Table[PolarCoordinate[Sqrt[i], i g], {i, 1, 1000}]]]

enter image description here

Demonstrations project has a lot too, for example:

enter image description here

enter image description here

share|improve this answer
I have a question though: how to determine the number of spirals in such a pattern for a given phi (here g)? Claude Fabre showed that all points locate on a single spiral curve, but the pattern here seems several spirals exist as well as depicted in the sunflower pattern (cyan curves). – Tony Dong Mar 9 '13 at 23:42
@TonyDong I think you just need to count how many dots you place for full single angle turn 2Pi. – Vitaliy Kaurov Mar 10 '13 at 0:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.