A living phylogeny: species branch, die out and survive mass extinctions in a ring.
A birth-death process runs through deep time: each lineage speciates or goes extinct at rates set by its traits, a body size that drifts by Brownian motion and a habitat that rarely shifts between sea, land and air. Speciation slows as the world fills up, flight is a key innovation, and large bodies raise the risk of extinction. The tree is a circular cladogram with time running outward, branches colored by body size and rings for size and habitat at the rim; a depth-first layout re-spaces the tips every frame and every node eases into place. Extinct twigs fade like a thinning fossil record, the root climbs to the survivors' common ancestor, and the lineages-through-time plot compares the true species count with the one reconstructed from the survivors.
Try it. Hover a branch to see its clade, click it to zoom in, and click empty space or press Z to zoom out. Mass extinction (or E) wipes out most species, hitting large bodies hardest. Up and down change the speed, Space pauses and R restarts from a single species, whose sparse first epoch runs fast until the tree fills in.
Paste this into Claude Code, Codex or any coding agent to get a simple version running, then take it wherever you like.
Build a live "tree of life" with JavaScript and the HTML canvas element: a birth-death simulation of species that is drawn as a circular family tree while it runs. Put everything in a single index.html file with no libraries or build step, so I can open it directly in a browser.
Start simple:
- Each lineage is an object with a birth time, an end time (null while alive), a parent and a list of children. Start with one living lineage at time 0.
- Advance time in small steps. For each living lineage, with probability birthRate * dt it speciates (it ends and two new child lineages begin) and with probability deathRate * dt it goes extinct. Make the birth rate fall as the species count nears a cap of about 150.
- Lay out the tree radially: walk it depth first, give each tip an evenly spaced angle around the circle, and give each ancestor the average angle of its first and last child. Map time to radius so the root is at the center and the present is at the rim.
- Draw each lineage as a radial line from its birth radius to its end radius, and an arc joining its children where it split. Draw extinct lineages in dim grey.
Once that works, make it beautiful:
- Give each lineage a body size that drifts randomly each step, and color branches by it on a dark background.
- Ease every node's angle toward its new target each frame so the tree breathes instead of jumping.
- Add a "mass extinction" button that kills about three quarters of living species and draws a dashed ring at that moment.
- Plot the number of living species over time on a log scale next to the tree.
Explain the key ideas in short code comments. When you're done, tell me how to open it and suggest three directions I could take it next, such as fading and pruning extinct twigs, clicking a clade to zoom into it, or comparing the true species count with one reconstructed from the survivors.