Bioregenerative Crop-Atmosphere Model (2D)
2D closed-loop space-farming lab: a Michaelis-Menten light/CO₂/temperature/nutrient photosynthesis model drives real logistic canopy growth, whose CO₂ uptake and O₂ release are coupled to a live habitat atmosphere balance against crew respiration.
The 3D original spins a hydroponic ring around a scene with four decorative sliders (an "agriculture level," a "crop level" and a "sustainability level" with no computed relationship to one another or to what's on screen). This 2D companion replaces that with a real physiologically based crop model: each plant's photosynthetic capacity is the product of independent light, CO₂, temperature and nutrient-EC stress factors — the same multiplicative-limitation approach crop models like DSSAT and APSIM use — driving logistic biomass growth that saturates at canopy capacity instead of growing without bound. Because this is meant to be grown inside a sealed habitat, the model goes one step further than a standalone growth chamber: net canopy photosynthesis pulls the habitat's CO₂ down and pushes its O₂ up, a life-support scrubber only partially compensates toward your CO₂ setpoint, and a crew-size slider adds a constant respiration load — so the "O₂ self-sufficiency" readout genuinely tracks whether the canopy you've configured could keep a crew breathing, not just whether it looks green.
Photosynthetic stress factors: f_light = I/(I+220) (rectangular hyperbola), f_co2 = C/(C+350) (Michaelis-Menten, C3 pathway), f_temp = exp(-(T-24)²/128) (Gaussian optimum), f_nutr = EC/(EC+0.9). Per-plant biomass follows dB/dt = Gmax·(f_light·f_co2·f_temp·f_nutr)·B·(1-B/Bmax), integrated at a fixed sub-step over simulated mission days. The limiting-factor readout reports whichever stress term is currently smallest. Habitat CO₂ and O₂ are updated each step from canopy gas exchange (proportional to realized growth rate) against a constant crew respiration load and a finite-rate CO₂ injector chasing the setpoint slider — verified by construction: starving any one input (light, CO₂, EC or temperature) measurably slows growth and the limiting-factor label switches to it, and adding crew without adding canopy visibly drags O₂ self-sufficiency below 100%.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install