In-Silico Organoid Simulation
This interactive application simulates the emergent behavior of biological tissue.
It uses an Agent-Based Model (ABM) to demonstrate how complex, life-like structures arise from simple, local rules followed by individual cells.
Interactive Controls
The simulation operates in an autonomous loop. If left idle for 10 seconds, Observation Mode (Demo) engages to cycle through growth, stress, and regeneration phases.
You can interact with the canvas and buttons at any time—they work During demo without stopping it.
All controls are usable with a mouse or directly via touch: tap, drag, long-press and even pinch-to-zoom on mobile screens. No keyboard is required; the interface was built to run fully on phones and tablets.
- Click & Drag: Seed new Stem Cells (Green).
- Right Click (or Long Press): Excise/Remove cells.
- + Growth: Divides existing Green stem cells to increase population; it does not create new ones. If the system already has the maximum number of cells you'll see a "limit reached" notice, and if no green stems remain you'll be told that too.
(You can always add fresh stem cells manually by clicking/dragging the canvas.)
- Differentiation: Convert Green (stem) → Blue (mature tissue).
- Toxin: Trigger cell death (Red necrotic cells fade over time).
Demo Observation Mode Explained
When Demo runs, it cycles through these 6 phases (each lasting ~5 seconds):
- Proliferation: Green stem cells divide rapidly (population grows).
- Maturation: Green cells convert to Blue differentiated cells (growth stops, tissue matures).
- Homeostasis: More growth to balance the system.
- Toxic Event: Cells turn Red (necrotic) and begin to die.
- Clearance: Dead Red cells fade away.
- Regeneration: Survivors regrow, or if wiped out, a new seed cluster appears.
Tip: If you click + Growth after Phase 2 and nothing happens, it's because most cells are now Blue (differentiated) and cannot divide. Click Reset to start fresh with Green cells, or wait for the Regeneration phase.
Biological Dynamics
Real organoids are miniaturized versions of organs produced in vitro. They self-organize in three-dimensional culture. This 2D simulation captures four critical dynamics of that process:
1. Proliferation & Contact Inhibition
Stem Cells (Green) possess the unique ability to divide (mitosis). In this model, they follow "Contact Inhibition" rules: if a cell is too crowded by neighbors, it will refuse to divide even if growth factors are present. This prevents the tissue from becoming infinitely dense, mimicking real tissue pressure.
2. Differentiation (Lineage Commitment)
Differentiated Cells (Blue) represent mature tissue (e.g., neurons in a brain organoid or epithelial cells in a gut organoid). Once a stem cell differentiates, it loses the ability to divide but gains structural stability. This creates a "Terminal Lineage"—once blue, a cell cannot go back to being green.
3. Necrosis & Apoptosis
Necrotic Cells (Red) represent tissue death. In real organoids, cells in the center often die because oxygen cannot diffuse that deep (the "necrotic core"). In this simulation, you can trigger necrosis via the "Toxin" control. These cells gradually lose structural integrity, shrink, and are eventually cleared from the system.
4. Homeostasis & Regeneration
Biological systems are resilient. This simulation is designed to run indefinitely. If a toxic event wipes out most of the colony, surviving stem cells can repopulate the empty space. If the colony is entirely wiped out, a new "seed" cluster is naturally generated, representing the introduction of new biological material.
Why Simulate Organoids?
In-Silico (computer-based) trials are becoming a crucial step in modern biology before In-Vitro (lab) or In-Vivo (animal/human) testing.
- Drug Screening: Researchers can test thousands of virtual toxin concentrations to predict how a tumor might react before wasting expensive lab reagents.
- Pattern Formation: Mathematical biologists study how uniform clusters of cells break symmetry to form fingers, tubes, and cavities.
- Reductionism: By simplifying biology to simple physics rules, we can learn which behaviors are essential and which are merely noise.
Technical Architecture
This application runs entirely client-side with Zero Dependencies (Vanilla JavaScript).
- Verlet Integration Physics
-
Unlike standard rigid-body physics, this engine treats cells as "soft bodies." It calculates velocity implicitly based on previous positions, making the collisions feel organic and squishy rather than bouncy.
- Spatial Hashing
-
To maintain 60 FPS when hundreds of cells are crowding the canvas, the engine avoids comparing every cell against every other one (which would be a very slow, squared amount of work). Instead it drops cells into a simple grid - think of dividing the area into little boxes - and only looks for collisions among neighbors in the same or adjoining boxes. This cheap "square" checking keeps the simulation smooth on even modest devices.
- Procedural Sonification
-
The audio is not a recorded file. It is synthesized in real-time using the Web Audio API. The pitch and modulation of the oscillators are mathematically derived from the cell count and event types (mitosis vs. apoptosis).
Future Expansion
Current research is moving toward Digital Twins—virtual replicas of specific patients' tumors. Future versions of this software could incorporate:
- Diffusion Gradients: Simulating oxygen flowing from the outside in, automatically creating necrotic cores without user intervention.
- Genetic Algorithms: Allowing cells to "evolve" different adhesion rates to see which structures survive best.
- ECM (Extracellular Matrix): Simulating the sticky scaffold that holds cells together, allowing for non-spherical shapes like tubes or sheets.