8
$\begingroup$

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

$\endgroup$
  • 5
    $\begingroup$ 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. $\endgroup$ – Oleksandr R. Mar 9 '13 at 5:51
  • 2
    $\begingroup$ Mandatory reference: youtube.com/watch?v=lOIP_Z_-0Hs :-) $\endgroup$ – Mr.Wizard Mar 9 '13 at 6:25
  • $\begingroup$ @Mr.Wizard her videos are awesome! $\endgroup$ – chris Mar 9 '13 at 14:49
  • 1
    $\begingroup$ here is the original picture if someone wants to give it a try: upload.wikimedia.org/wikipedia/commons/8/86/… $\endgroup$ – shrx Dec 31 '13 at 12:45
23
$\begingroup$

It is called a spiral phyllotaxis pattern. There is a lot of Mathematica material for this. Chris Carlson's blog entry gives you some 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}]]]

phyllotaxis pattern

The Demonstrations project has a lot too; for example:

Phyllotaxis Spirals, Stephen Wolfram

Phyllotaxis Explained, Claude Fabre

$\endgroup$
  • $\begingroup$ 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). $\endgroup$ – Tony Dong Mar 9 '13 at 23:42
  • $\begingroup$ @TonyDong I think you just need to count how many dots you place for full single angle turn 2Pi. $\endgroup$ – Vitaliy Kaurov Mar 10 '13 at 0:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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