Sunflower Phyllotaxis Pattern Calculator

How this sunflower pattern calculator works

Sunflower heads look organic, but the layout behind them can be described with a compact mathematical rule. Each new seed is placed a fixed angle away from the previous one, and its distance from the center grows with the square root of its index. This calculator turns that rule into usable coordinates. If you are planning a spiral garden bed, building a laser-cut panel, generating procedural art, or simply studying mathematical botany, the tool gives you a quick way to move from theory to a coordinate list you can actually use.

The page does two practical jobs. First, it estimates the full size of the pattern through the maximum radius. Second, it prints coordinate rows for the first seeds so you can inspect or copy them into another program. Those two outputs answer different questions. The radius helps with planning overall space, while the coordinate preview helps with implementation. That distinction matters because the preview count controls only how much text is shown, not how large or dense the finished sunflower becomes.

What each input means in plain language

Number of Seeds is the total number of points in the finished pattern. Raising it increases the number of florets and pushes the outer edge farther from the center. Scaling Factor (cm) is the constant c in the radial formula. It sets the spacing scale for the whole pattern, so larger values spread every seed outward while smaller values create a tighter disk. Display First N Coordinates simply tells the result panel how many rows of coordinates to print. It is there for readability and copying convenience; it does not alter the geometry.

Because the scale is expressed in centimeters, the calculated x and y coordinates are also in centimeters. Positive x values lie to the right of the center, negative x values lie to the left, positive y values lie above the center, and negative y values lie below it. If you paste the coordinates into software that uses a downward-pointing y-axis, the numeric values are still valid, but the pattern may appear vertically flipped when drawn.

The actual phyllotaxis model

In a classic sunflower model, seed number n is placed at angle n times the golden angle and at radius c√n. The golden angle is irrational relative to a full rotation, so the points do not keep landing on the same spokes. That is why the disk fills so evenly and why visible spiral families emerge only as approximate alignments rather than rigid radial lines. The calculator uses that exact idea and converts each seed from polar coordinates into Cartesian coordinates with cosine and sine.

If you like to think more abstractly, the page is still just a function that maps a small set of inputs to an output. The general viewpoint is captured by the formulas below, and the later section narrows that idea to sunflower geometry specifically. Keeping this abstract picture in mind is useful when you compare runs, because it reminds you that the result should change in predictable ways when one input changes and the others stay fixed.

R = f ( x1 , x2 , , xn ) T = i=1 n wi · xi

For this calculator, the specific phyllotaxis equations are the ones that matter most. They are preserved in MathML later on the page so browsers and assistive technology can interpret them semantically. The JavaScript uses the same structure, with the golden angle stored in radians because that is the natural unit for trig functions in code.

How to use the result without guessing

Start with the total number of seeds you want in the finished disk. Then choose a scale that matches the physical or visual spacing you want. After you click Generate Pattern, the result panel reports the maximum radius and prints the first coordinate rows. The radius tells you how far the pattern extends from the center. The coordinate preview lets you inspect the early points, verify units, and copy a manageable sample into another tool. If you need more rows, increase the display count and regenerate.

A quick sanity check helps. If you double the scale factor, every radius should double, including the maximum radius and the magnitude of every coordinate. If you double only the seed count, the radius does not double. Instead, it increases by a factor of √2. That slower growth surprises many people the first time they see it, but it is exactly what keeps large patterns visually compact. Adding many seeds fills the outer region without making the disk explode in size.

Worked example

Suppose you enter 100 seeds, a scale of 0.5 cm, and a preview count of 10. The outermost seed lies at radius 0.5√100 = 5.0 cm, so the completed sunflower reaches about 5 cm from the center. The preview then lists only the first ten rows of coordinates. In other words, the geometry is based on all 100 seeds, but the text output remains short enough to read and copy comfortably.

When you scan the first rows, expect both positive and negative coordinates. That is not a warning sign. It simply means the seed has landed in a different quadrant of the Cartesian plane. Also notice that the preview count does not alter the maximum radius. If you keep 100 seeds and the same scale but change the preview from 10 to 25, you are still describing the same sunflower head; you are only asking the page to print more of the coordinate list.

Assumptions and limitations

This model is intentionally clean. It assumes idealized phyllotaxis with uniform scaling, point-like seeds, no mechanical deformation of the flower head, and no clipping by an outer boundary. Real plants can compress locally, deviate near the rim, or respond to biological constraints that this simple model ignores. Artists may also choose a custom rotation offset or a different radial law for visual reasons. In those situations, the calculator remains an excellent starting point, but it is still a model rather than a full biological simulation.

The most important interpretation rule is simple: the labels mean exactly what they say. Number of Seeds describes the full count, Scaling Factor sets radial size in centimeters, and Display First N Coordinates changes only the amount of printed output. Once that is clear, the results become easy to trust and compare across scenarios.

Phyllotaxis and the beauty of number patterns

The spiral pattern seen in sunflower heads, pinecones, agaves, and many succulents is called phyllotaxis, the arrangement of repeated structures around a center or stem. The visual effect feels decorative, but it is closely tied to efficient packing. A divergence angle that resists simple fractional alignment helps new seeds avoid piling onto the same spokes, which creates a fuller, more even distribution. That is one reason the golden angle appears so often in botanical discussions. It is not magic; it is a compact geometric recipe that produces remarkably balanced spacing.

For designers and makers, that natural balance is useful far beyond botany. A phyllotaxis layout can become a drill pattern, a bead arrangement, a sculpture plan, or a parametric graphic. Gardeners can use it to estimate how wide a spiral planting feature will grow. Teachers can use it to show how geometry, trigonometry, and irrational numbers produce a striking visual outcome. The calculator below keeps the input set intentionally small so the connection between the formula and the picture stays easy to follow.

The Golden Angle Formula

Plants that display radial symmetry tend to place successive seeds or leaves at a constant divergence angle to avoid overlap and maximize exposure. The most efficient packing occurs when this angle is irrational relative to a full rotation, preventing seeds from lining up in the same few directions. The ideal value is the golden angle φ, derived from the golden ratio Φ=12(1+5). The golden angle itself satisfies

φ = 360 ° × 1 Φ 2 137.508 °

Once the divergence angle is fixed, the radial distance of the n-th seed from the center is

r = c n

where c is a scaling constant. The angular position is θ=nφ. Converting to Cartesian coordinates yields x=r·cosθ and y=r·sinθ. These equations are exactly what the script uses to generate the coordinate list in the result area.

Example coordinates

The first few rows are often enough to confirm that your chosen scale is reasonable. Early coordinates sit close to the center, while later ones move outward more gradually than people expect because the square-root term slows radial growth. That is a core reason the pattern looks dense without becoming huge.

First few sunflower seed coordinates (c = 0.5 cm)
n x (cm) y (cm)
1 0.38 0.11
2 0.12 0.66
3 -0.54 0.69
4 -0.91 0.04
5 -0.36 -0.93

Notice how the signs change from row to row. That is simply the point circling around the origin. If you plot these points, the spiral becomes obvious very quickly. The preview is especially helpful when you are checking orientation in a drawing package or validating that the scale factor produces the spacing you wanted before you generate many more seeds.

Fibonacci and visible spirals

As seeds accumulate, observers often count two families of interleaving spirals winding in opposite directions. Remarkably, the visible counts usually resemble consecutive Fibonacci numbers such as 34 and 55. This happens because Fibonacci ratios FnFn+1 are excellent rational approximations to the golden ratio. In practical terms, those approximations create near alignments often enough to produce visible spiral families, while the irrational base angle still prevents the pattern from collapsing into a few repeated spokes.

This is one of the most satisfying parts of phyllotaxis: the same simple rule explains both local spacing and the larger spiral structure people notice at a glance. The calculator uses the exact golden-angle model, so those Fibonacci-like spiral counts arise naturally from the geometry rather than being manually imposed.

Table of sample radii

Maximum radius for common seed counts
Seed Count N Scale c (cm) Max Radius (cm)
100 0.5 5.00
200 0.5 7.07
500 0.5 11.18
500 0.8 17.89

Because the radius grows with the square root of the seed index, doubling the number of seeds increases the radius by about 41%, not 100%. That is a useful planning intuition. If you need a much wider disk, changing the scale factor has a stronger visual effect than adding more seeds alone. If you need a denser texture without dramatically increasing diameter, raising the seed count is often the better move.

Another practical interpretation follows from basic geometry: the total diameter is twice the maximum radius. So if the result says 11.18 cm, the whole pattern spans about 22.36 cm across. That is often the number you need when planning clearances on paper, in a planter, or on a fabrication sheet.

How to use the max radius in real projects

When the result panel reports a maximum radius, think of it as the distance from the center to the outermost seed. For a circular layout, double that value to estimate the full diameter. If you are cutting wood, acrylic, or metal, add whatever margin your material or fasteners need. If you are planning a bed or container, remember that the real footprint may need extra space beyond the mathematical radius for edging, plant size, or visual breathing room.

Large seed counts are easiest to manage when you separate planning from preview. Use the full seed count and scale to decide the overall size, then keep the preview count modest so the coordinate list stays readable. That pattern of use mirrors how many real projects work: first estimate the envelope, then inspect representative coordinates, and only then export or copy the subset you need for the next tool in your workflow.

Continue exploring spiral and geometry patterns with the Fibonacci sequence calculator, the circle area calculator, and the Parker spiral magnetic field calculator to see how rotational structure appears across math, physics, design, and nature.

Generate coordinates

Enter the total seed count, choose a scale in centimeters, and decide how many coordinate rows to preview. The calculator will compute the full-pattern maximum radius and print a coordinate sample you can review or copy.

Total points in the full sunflower layout.

Controls the overall spacing because the radius uses r = c√n.

Limits how many coordinate rows are printed in the result box; it does not change the pattern itself.

Enter seed count and scale to compute coordinates.

After generating a pattern, use this button to copy the radius and preview coordinates.

Mini-game: Golden Angle Bloom

This optional canvas mini-game turns the calculator idea into a fast timing challenge. Each tap plants the next seed on its ring. Your job is to release when the sweeping arm crosses the glowing golden-angle slot. Clean runs build a sunflower that looks balanced, while rushed taps create visible gaps and clumps. The game is separate from the calculator output, but it teaches the same geometry through motion and feedback.

Score0
Time75.0s
Streak0
Seeds0
PhaseReady
Best0

Golden Angle Bloom

Build the cleanest sunflower you can in 75 seconds. Tap or click when the rotating arm passes through the glowing slot for the next seed. You can also press Space while the game canvas is focused.

Mission: Perfect placements extend your streak and add a little time. After the opening phase, the sweep speeds up, reverses direction, and later adds Fibonacci bloom bonuses to keep the pattern alive and replayable.

Educational takeaway: in phyllotaxis, each seed advances by about 137.5°, while the radius grows with √n, so the outer rings expand more slowly than the seed count.

Embed this calculator

Copy and paste the HTML below to add the Sunflower Phyllotaxis Pattern Calculator – Seed Coordinates, Radius, and Golden Angle Layout to your website.