phyllotaxis - blossommerz/locus-hub GitHub Wiki
Home > Phyllotaxis - a sunflower scatter
< Previous: The random-tiler system | Next: The halftone pipeline >
A short hands-on recipe - place hundreds of points on a spiral driven entirely by the node graph.
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.
Number the points 0, 1, 2, 3, ... and place point i using two values computed from its index:
-
Angle:
i x goldenAngle, wheregoldenAngleis 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.
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.
-
Series - set Count 400, Start 0, Step 1. This is the index list
i: the numbers0, 1, 2, ... 399on one thick wire. - Math set to x, with A = i and B = goldenAngle. Every index gets multiplied by the golden angle, giving the angles list.
- Build the radii in two steps:
- 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.
- 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.
- Realize to bake the ghosts into real geometry you can select and build on.
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 >
- Series: the index list that drives the whole scatter.
- Point: Polar - turns angle-and-radius pairs into points.
- Math: list-aware arithmetic for the angles and radii.
-
Constants & unit conversions: where
goldenAngleand the rest of the palette live. - Lists & collections: how the thick wire carries a whole list through one node.

