MorphoState is a computational workbench for designing, simulating, and predicting bioelectric pattern formation.
Treating morphogenesis as a programmable dynamical system, MorphoState provides a unified interface to explore reaction-diffusion systems and excitable media. It enables researchers and engineers to map the "Morphospace"—the landscape of possible biological shapes—and design intervention protocols to navigate between them.
The platform visualizes the invisible bioelectric gradients that precede physical structure, offering tools to perturb, clone, and guide these patterns in real-time using WebGL-accelerated solvers.
MorphoState runs on a custom solver supporting two primary mathematical models of biological pattern formation:
The canonical model for Turing patterns (skin pigmentation, skeletal structures). It simulates two chemical species:
- U (Feed): Diffuses rapidly and feeds the reaction.
- V (Kill): Diffuses slowly and converts U into more V (autocatalysis), before decaying.
A model of excitable media used to simulate neural impulses and cardiac tissue. It captures the dynamics of activation (depolarization) and recovery (repolarization), allowing for the study of spiral waves and fibrillation.
- High-Fidelity Rendering: Visualize voltage potentials and morphogen concentrations with fluid 60FPS performance.
-
Multi-Layer Visualization:
- Voltage Potential: Raw concentration data.
-
Morphogen Gradient: Visualizes the rate of change (
$\Delta$ ). - Age/Stability Map: Highlights regions of pattern persistence to identify attractors.
- Deviation Map: Computes the difference matrix between the current state and a captured "Target Morphology."
Biology does not exist in a vacuum; it navigates a landscape of possibilities. The Morphospace module plots Feed Rate (
- Phase Regions: Automatically identifies regimes (Solitons, Stripes, Chaos, Inert).
- Protocol Designer: Plan therapeutic interventions by plotting trajectories through phase space. Create a path from a "Disease State" (Start) to a "Healthy State" (Target) via safe Waypoints.
- Risk Analysis: The system calculates "Chaos Exposure" and "Bio-Work" (energy cost) for your designed protocols.
Interact directly with the simulation field using virtual bio-electric tools:
- Seed/Saturate V: Inject morphogens or depolarize tissue regions.
- Clear V: Repolarize/Reset specific anatomical regions.
- Buffer Copy (Cloning): Shift+Click to sample a functional pattern structure and graft (paste) it onto new coordinates.
- Line Scan Profiler: Drag across the canvas to generate real-time cross-section plots of concentration gradients.
- Procedural Video Export: Record high-bitrate WebM videos of your simulations directly in the browser (supports VP9/VP8).
- Data Snapshots: Export high-resolution PNG captures of the simulation state.
- Live Metrics: Monitor Shannon Entropy, Morphogen Density, and System Stability in real-time.
- Node.js v20+
- npm
-
Clone the repository
git clone https://github.com/dovvnloading/Morphostate.git cd Morphostate -
Install dependencies
npm install
-
Start local development server
npm run dev
-
Build for production
npm run build
- Simulation View: The primary workbench. Use the "Physics" tab to switch between Gray-Scott and FHN engines. Use the "Tools" tab to manipulate the field.
-
Morphospace View: Click "Protocol Designer" to draw a trajectory. Click nodes to adjust their specific
$f$ and$k$ values. Click "Deploy Protocol" to send this trajectory to the Simulation engine. - Dashboard: Review logs and aggregate statistics of your current session.
- Go to Morphospace.
- Select Protocol Designer mode.
- Click to place your Start Node (Current State).
- Click to add Waypoints (avoiding the Red "Chaos" regions).
- Click to place your Target Node (Desired Morphology).
- Review the Risk Analysis panel on the right.
- Click Deploy Protocol. The system will switch to Simulation View and automatically interpolate parameters over time.
Distributed under the MIT License. See LICENSE for more information.
Built by Matthew Robert Wesney