nanopython / simulation
Predator-prey simulation
Lotka-Volterra in main.py. Python reads the sliders, integrates the trajectory, then drives a setInterval animation loop — drawing each frame to the canvas via the js bridge. JavaScript only boots the wasm.
Loading…
Parameters
Populations vs time / phase plot
Notes
The wasm instance boots once on page load — main.py wires the Start / Stop / Reset clicks and the slider inputs through the js bridge, then exits. From then on every click and every animation frame fires straight into the still-live Python module. Sliders are integer-valued (and rate sliders are pre-scaled by Q=1000) so the float-less nano build never touches floats.