Each cone in the canopy is a leaf cluster whose colour and height track its own instantaneous carbon gain. A sun orbits overhead driving a day/night cycle; incoming light (PAR) follows that cycle, scaled by your peak-light setting. Gross primary production (GPP) per leaf combines a light-response curve, a CO₂-response curve and a temperature-response curve, each shaped differently for C3, C4 and CAM plants. Net primary production (NPP) subtracts maintenance respiration, which rises with temperature (Q10 ≈ 2) and continues through the night — this is why NPP can dip negative after dark.
GPP = Pmax · L/(L+K_L) · [CO2]/([CO2]+K_C) · exp(−(T−Topt)²/2σ²)
Rd = R0 · Q10^((T−20)/10)
NPP = GPP − Rd
- C3 (most trees, wheat, rice): saturates at moderate light, strongly CO₂-limited (photorespiration), optimum ≈ 25°C. Rising CO₂ helps it the most.
- C4 (maize, sugarcane, most grasses): a carbon-concentrating pump keeps it CO₂-saturated even at today's ambient level, tolerates more light and heat, optimum ≈ 35°C.
- CAM (cacti, succulents): stomata open only at night to fix CO₂ into malic acid (the store gauge fills after dark); during the day stored carbon is released internally and turned into sugar using daylight, without losing water through open stomata — a water-saving strategy that trades off peak productivity.
- Peak light / CO₂ / temperature sliders set the environment every leaf responds to; NDVI-style canopy greening is exactly this GPP signal integrated at leaf scale, and eddy-covariance towers measure the ecosystem-scale NPP this simulation approximates per-plant.