Plants

How trees, shrubs, flowers and cacti are generated as pixel sprites 8 to 96 pixels tall: which of the four classic algorithms fits, which traits make a species read at a glance, the small generators that cover desert and tropical forms, how meadows are mixed, and how pixel artists finish foliage. The answer is one brancher in the Weber–Penn manner at two or three levels, a crown envelope, and leaf clusters stamped at the tips rather than drawn as twigs, with L-systems kept for herbs, ferns and vines and a few special generators for palms, pads and cacti.

Proposed: none of this is in Tycho yet. The demos run here in the page, written in plain JS with the study’s own kit (demos/kit.js), not Tycho; each says how it would run in Tycho: per frame (the GPU stand-in’s calls), pre-bake (painted once offscreen), or shader (per-pixel work every frame). What would move into Tycho, and when, is in the roadmap.

Four algorithms

Plant generation has four classic algorithms, and one of them fits pixel sprites best.

Algorithm How it works Its limits
L-systems Bracketed turtle grammars: F draws, + and − turn, [ and ] push and pop the turtle; stochastic and parametric variants let one grammar vary by seed (Wikipedia: L-system) Fastest, but worst at following a target shape (Nuić et al. 2019)
Space colonization Grows a tree toward attraction points scattered inside a crown envelope; narrow envelopes give a clear central trunk as an emergent property The authors “were not able to generate strongly pendulous, ‘weeping’ trees” (Runions et al. 2007)
Particle flow Particles fill the crown, fall under gravity and attract each other, and merge as they meet; their trajectories become branches, so growth runs from the leaves to the trunk (Nuić et al. 2019) Slowest, with “many parameters that need to be fine-tuned” (Nuić et al. 2019)
Weber and Penn (1995), the basis of Blender’s Sapling Per recursion level: a child count, down angle, spiral rotate angle, length ratio, taper, curvature and split rate; eight ShapeRatio crown curves from conical (0.2 + 0.8r) to flame; AttractionUp, whose negative values droop (Weber and Penn 1995; Blender manual) Sits between the others
The Algorithmic Beauty of Plants gives six classic 2D plants with angles of 20° to 25.7°, Honda’s monopodial tree, and tropism as a turn toward a gravity vector by e· H × T per segment (ABOP). Its width rule, wr = 0.707, is Leonardo da Vinci’s observation that the branches above a fork together match the trunk below (ABOP p.57). Weber and Penn’s weeping willow uses AttractionUp −3, and their quaking aspen a tend-flame crown on a trunk bare for 40% of its height (Weber and Penn 1995). Phyllotaxis covers rosettes and flower heads: Vogel’s φ = n·137.5°, r = c√n, a pattern that visibly breaks at 137.3° or 137.6° (ABOP ch. 4).

For 8 to 96 pixel sprites, the best core is a Weber–Penn-style brancher at two or three levels, with the last level drawn as leaf-cluster stamps rather than twigs, colonization kept as an option for crowns that must fill a silhouette, and L-systems kept for herbs, ferns and vines (inference).

What makes a species read

Species read at a glance through a handful of traits, and botany already names the structural ones. Hallé and Oldeman’s 23 architectural models sort trees by branched or unbranched, monopodial or sympodial, upright or horizontal axes, and rhythmic or continuous growth (LibreTexts key). About ten of them matter for game trees (inference from the key):

Model For
Corner The single-stem palm
Tomlinson Clumping palms and bananas
Leeuwenberg Forms that fork after each flowering
McClure Bamboo groves
Massart, Aubréville Tiered pagoda shapes
Rauh The default temperate tree
Troll, Champagnat Spreading and arching forms

On top of architecture, six visible traits separate species: crown envelope, bare-trunk fraction, branch posture, tier rhythm, bark ink and mark, and a seasonal cue.

Species Its signature
Eastern white pine Whorls of 5 to 6 branches “like wagon-wheel spokes” in well-separated tiers (Virginia Tech dendrology)
Italian cypress An “exclamation mark” under a tenth as wide as it is tall (Wikipedia)
Fir Cones stand upright “like candles” (Wikipedia: Fir)
Larch A conifer whose needles turn gold and drop (Wikipedia)
Birch White bark with black fissures (Wikipedia: Betula pendula)
Aspen Bark with black horizontal scars; its clones turn gold at different times (Wikipedia: Populus tremuloides)
Beech Keeps dead leaves through winter (NC State: Fagus)
Baobab Leafless for about eight months (Wikipedia: Adansonia)
Jacaranda Blooms purple-blue on bare wood (NC State: Jacaranda)

At 16 pixels only envelope, bare trunk and posture survive. Tiers, bark marks and seasons start to show from about 48 pixels (inference).

Sixty plant species. Twenty-one trees, seventeen shrubs and ground plants, fifteen flowers and seven succulents, each a small generator:
  • broadleaf skeletons with per-species angle and droop, grown four times with the best kept;
  • conifers as stacked, ragged skirts;
  • palms and tree ferns as fronds bent by gravity;
  • cacti as ribbed bodies;
  • sunflowers on Vogel's golden-angle spiral.
Every species follows the same finishing rules from the pixel tutorials: clumps lit from one side, bark textures that run along each limb, no orphan pixels, and a selective outline. Seasons recolor, strip, blossom or snow each plant. The swatch by each name is the color the zoom demo (in Zoom and chunks) uses far away. Tap a plant for its seed variants and its year, or open Scene for a biome.

Desert, tropical and dead trees

Many desert and tropical forms need no recursive brancher at all.

Plant Its growth
Saguaro First arms at about 60 to 75 years; can carry dozens (the record is 78) (NPS; Wikipedia)
Prickly pear Pads stacked end to end (Wikipedia: Opuntia)
Barrel cactus Leans south (Wikipedia: Ferocactus wislizeni)
Agave Flowers once after 10 to 30 years, on a stalk up to about 8 m, then dies (Wikipedia)
Joshua tree Unbranched until its first bloom (Wikipedia)

Three small generators cover these: a trunk path with a frond rosette at its tip, a segment chain for pads, cholla joints and bamboo culms, and a ribbed column with elbowed arms, with rosettes placed by the 137.5° rule (inference).

Dead trees follow a documented decay sequence: needles red, then a bare skeleton with fine branches intact, then lost twigs and cracking bark, then a hard snag with little bark, with broken tops uncommon until late (USDA Forest Service). That sequence becomes a decay level from 0 to 5 applied to any live tree (inference).

Flowers and meadows

Ground cover and flowers lean on stamps. Flowers read at 3 to 12 pixels by petal count and posture:

Flower Reads by
Corn poppy Four petals with a black spot (Wikipedia: Papaver rhoeas)
Wild rose Five petals (Wikipedia: Rose)
Tulip Six tepals (Wikipedia: Tulip)
Cosmos Eight rays (Wikipedia: Cosmos bipinnatus)
Bluebell A one-sided nodding raceme (Wikipedia: Hyacinthoides)

Botany even supplies palette constraints. Tulips have no pure blue, roses lack the enzyme for blue pigment, irises have no true red, and blue-flowered species are reported at under 10% of flowering plants (Wikipedia: Blue flower colouration; Wikipedia: Iris; Gulf News).

A meadow is a weighted species list. One cornfield seed mix runs corncockle 40%, poppy 25%, cornflower 20%, corn chamomile 12.5% and corn marigold 2.5% by weight (Germinal WF10), and a generator can scatter each species by Poisson disk and clump it into drifts by low-frequency noise (inference). Scatter itself is on worlds and levels.

Finishing foliage

Pixel artists agree on how foliage should be finished, and their rules translate into passes.

Together these give a recipe (inference):

  1. Run the skeleton.
  2. Place clump discs at the tips.
  3. Shade each disc by a light vector into three or four bands.
  4. Paint back to front.
  5. Stamp a small fixed set of leaf clusters by Poisson disk.
  6. Remove orphans and add a selective outline.

At 8 to 16 pixels a jittered silhouette template per family beats any skeleton (inference). Seasons are then palette slots, since autumn yellow comes from carotenoids in birch and aspen and red from anthocyanins in maples and oaks (Wikipedia: Autumn leaf color). Sway is a per-row offset floored to whole pixels that grows with height (godotshaders: 2D wind sway; dev.to); motion has how it’s drawn. The demo above is a flora library built this way. Locally, Merryfolk’s recursive makeBareTree and blob-lit paintCrown are the only existing plant generators in the five games (js/sprites.js).

Where it runs

Technique family Where it runs How
Flora (brancher, clump stamps, rosettes, pads, decay levels, season slots) Pre-bake Build once per seed and species; seasons as reprints; sway as row strips

Sources

The full research is in the notes on plants, trees and flowers.