Cells don't divide on a metronome. Watch a lineage prove it.
Mitosis Lab grows one seed cell into a live branching lineage tree. Stochastic timing and inherited, drifting traits make the colony look alive instead of like a particle demo.
Set every cell in a colony to divide exactly one second after the last, and you get a boring machine: 1, 2, 4, 8, 16, all in lockstep, a clock ticking in powers of two. Real cells never do that. They drift off the beat, and that single fact is the difference between a lifelike growing colony and a spreadsheet with a graph on it. Mitosis Lab is one dim seed cell that you press play on, and then watch bloom into a branching lineage tree in real time.
Most "simulations" on the web are particle systems: dots that attract, repel, and swirl with nothing behind them. They look busy and mean nothing. Meanwhile the one place a branching, growing structure genuinely means something, biology's cell lineage, is usually trapped in a static textbook diagram. Mitosis Lab takes that real process and makes it tactile: seed a cell, turn some knobs, and feel how the rules produce the tree.
The jitter is the whole point
Each cell's division interval is not fixed. It is drawn from a mean with a jitter term, so a cell whose mean is one second might actually divide at 0.7s or 1.4s. Crank the jitter slider to zero and the illusion collapses: every cell fires on the same schedule and the colony grows in hard synchronized pulses, whole generations popping into being at once. Nudge jitter back up and the divisions smear across time. New branches sweep outward in uneven, organic waves, which is exactly what a real colony under a microscope looks like. The knob does not add visual noise; it adds the right kind of noise, the kind that turns a clock into a living thing.
The other half is heredity. On division, each daughter inherits a mutated copy of its mother's genome: hue, size, and a division bias. The key word is copy. Because traits pass down and only drift a little each step, a mutation is not random static sprinkled on every cell. It is a lineage. A daughter that shifts toward cyan hands cyan to its own daughters, so you can trace a colour back up the tree to the exact division where it started. Turn the mutation rate up and the tree becomes a riot of colour sub-lineages fanning across the canvas; turn it down and the whole family stays close to the founder's green.
Why Canvas, and why the biology is separate from the pixels
A lineage reaches hundreds of nodes fast, and each one wants a smooth birth tween as it
lands. SVG would choke on that many live elements; an immediate-mode Canvas renderer drawn
at devicePixelRatio keeps it crisp on retina and holds 60fps while the tree keeps
growing. An auto-fit camera zooms and pans on its own so the whole colony stays in frame
with no fiddling.
The part I am most careful about you never see. The simulation core lives in its own
module, pure and deterministic, and it does not know Canvas exists. Every run is a pure
function of (seed, params): same seed, same parameters, byte-for-byte the same colony
every time. That means the biology (the RNG, the division scheduling, the trait
inheritance) is unit-tested in Node with no browser in the loop. The correctness of the
model is provable without a single pixel being drawn. It also means a striking run is
shareable: the seed and every slider live in the URL, so a link reproduces the exact tree
you were looking at.
Honestly bounded
This is an intuition pump, not a research instrument, and I would rather say so than pretend otherwise. It models stochastic timing and trait drift faithfully, but it caps the population and abstracts away metabolism, nutrients, and death entirely. Cells here divide and drift; they do not starve or age. The point is to let you feel how a couple of simple stochastic rules generate the branching genealogy biologists call a lineage tree, not to predict a petri dish. Within those walls, the thing it does model, it models correctly.
Try it
Open Mitosis Lab, press play, and watch the first cell divide with a soft synth blip. Then start dragging: pull mutation rate up and watch colour lineages split off; drop jitter to zero and see the divisions snap into synchronized waves; push the mean interval down to fast-forward the whole bloom. Grab the seed from the URL when you hit a colony you like, and the code is on GitHub if you want to read the division math instead of trusting the animation.
This post is part of the build log: every app my automated factory ships gets written up here, honestly. Browse everything at apps.charliekrug.com. Comments are open below.
Loading comments…