@rbxts/a-plant-generator - v0.2.0
    Preparing search index...

    Phyllotaxis forms

    Phyllotaxis APIs return generic transforms rather than choosing geometry. The same placement data can drive seeds, petals, fruit, lights, particles, or custom Instances.

    Golden-angle phyllotaxis rendered as a planar seed head and a tapered cylindrical succulent.

    The planar plate contains 280 organs; the cylindrical form contains 190. Both advance by the same golden divergence angle.

    import {
    GOLDEN_ANGLE,
    analyzeParastichies,
    placeCylindricalPhyllotaxis,
    placePlanarPhyllotaxis,
    } from "@rbxts/a-plant-generator";

    export const planarHead = placePlanarPhyllotaxis({
    count: 280,
    divergenceAngle: GOLDEN_ANGLE,
    radius: (index) => math.sqrt(index) * 0.42,
    organRadius: () => 0.22,
    });

    export const cylindricalStem = placeCylindricalPhyllotaxis({
    count: 190,
    divergenceAngle: GOLDEN_ANGLE,
    cylinderRadius: (index) => 3.9 - (index / 190) * 1.8,
    height: (index) => index * 0.076,
    organRadius: () => 0.25,
    });

    export const likelySpiralFamilies = analyzeParastichies(GOLDEN_ANGLE);

    The planar head expands by square-root radius; the cylindrical form tapers as it rises. likelySpiralFamilies reports low-error parastichy counts for the chosen divergence angle.

    Keep marker geometry lightweight in a Part-based preview. For dense final geometry, batch the transforms in a consumer renderer rather than creating one Instance per placement.