A coral colony is not one animal but thousands of genetically identical polyps produced by repeated asexual budding: a polyp grows a bud on its body wall, the bud differentiates its own mouth and tentacle ring, and stays physically connected to the colony through shared living tissue (the coenosarc). Each polyp i buds stochastically with a Poisson-like probability per frame:
P(bud in dt) = r · dt (r = budding rate)
When a bud fires, its growth direction is a weighted sum of the parent's own axis, an upward light vector (zooxanthellae need sunlight to photosynthesize), a fixed current vector (polyps orient to maximise food capture from flow), and a repulsion term from crowding neighbours:
d' = norm( 0.5·d_parent + L·k_light + C·0.3 + R·k_crowd + jitter )
newPos = pos_parent + d' · budDistance
This single local rule reproduces the two classic coral growth forms documented in reef biology (after Kaandorp's accretive-growth models):
- Budding rate — how often a polyp initiates a new bud; higher values grow the colony faster and denser.
- Phototropism — how strongly new growth bends toward the light vector. High values favour thin, upward, open branching (arborescent) colonies that race for sunlight; low values let current and crowding dominate, producing flatter, encrusting/massive growth.
- Crowding avoidance radius — the distance within which nearby polyps push new buds away and can suppress budding entirely. Large radii cap local density and open up branch tips; small radii let tissue pack tightly into a solid, boulder-like mass.
- Current direction — the ambient flow vector; colonies bend and elongate toward it, mirroring rheotropic growth seen on real reef flats.
*Scale is illustrative (arbitrary sim units), not a literal centimetre measurement.