phyllotaxis - blossommerz/locus-hub GitHub Wiki

Home > Phyllotaxis - a sunflower scatter

< Previous: The random-tiler system | Next: The halftone pipeline >

Patterns & Symmetry

Phyllotaxis - a sunflower scatter

A short hands-on recipe - place hundreds of points on a spiral driven entirely by the node graph.

A phyllotaxis sunflower scatter: points placed at successive 137.5 degrees turns with radius growing as the square root of the index

The phyllotaxis node graph: Series feeds two branches - one Multiply by goldenAngle gives the angles; a Power of 0.5 then Multiply by spacing gives the radii - both into Point: Polar, whose points feed Place, which stamps a motif at each.

This is the spiral a sunflower head makes - hundreds of florets packed so evenly that no gaps or seams appear anywhere in the disc. You don't place them by hand. You describe the rule once in the node graph and let the whole field fall out of it.

The rule behind the spiral

Number the points 0, 1, 2, 3, ... and place point i using two values computed from its index:

  • Angle: i x goldenAngle, where goldenAngle is 137.50776 degrees. Each point sits one golden turn further around than the one before it. That angle is the reason the florets never line up into spokes: no whole number of turns ever repeats, so every new point lands in the widest remaining gap.
  • Radius: spacing x sqrt i. The square root is what makes the disc pack evenly. Area grows with the square of the radius, so stepping the radius by sqrt i gives each successive point the same slice of area - the florets stay the same size from the center out to the perimeter.

goldenAngle is a named palette constant: you don't type the digits, you type its name and drop it as a Number. See Constants & unit conversions for the full palette.

Building it in the node graph

Everything below happens in the Nodes window. The Math node is list-aware - hand it a whole list and it applies its operation to every element - so you build the entire scatter without a single loop.

  1. Series - set Count 400, Start 0, Step 1. This is the index list i: the numbers 0, 1, 2, ... 399 on one thick wire.
  2. Math set to x, with A = i and B = goldenAngle. Every index gets multiplied by the golden angle, giving the angles list.
  3. Build the radii in two steps:
    • Math set to ^ (power), with A = i and B = 0.5: that's sqrt i for every index.
    • Math set to x, with B = spacing (start around 8). This scales sqrt i into the radii list. Because Math maps over the list, both operations run across all 400 indices at once.
  4. Point: Polar - wire Angle = angles, Radius = radii, and leave Center at the origin. It reads the two lists index-for-index and returns the list of points - the spiral itself.
  5. Place a small motif on those points to grow a floret at each one - or wire the radii list into a Circle: Center Radius (its Radius input is list-aware) so each circle grows outward toward the perimeter.
  6. Realize to bake the ghosts into real geometry you can select and build on.

Playing with it

Change one input and the whole field responds live:

  • Count sets how full the disc is: push Series up to 800 for a denser head, down to 100 for a sparse one.
  • spacing sets how tightly the florets pack: a smaller value pulls the whole spiral inward.
  • goldenAngle is the magic number. Nudge it even a fraction of a degree away from 137.50776 degrees and the even packing collapses into visible curved arms: a good way to see exactly how much the golden angle is doing.

< Previous: The random-tiler system | Next: The halftone pipeline >

Related

⚠️ **GitHub.com Fallback** ⚠️