Microtubules and motor proteins self-organize into asters, in two-color fluorescence.
Hundreds of rigid, polar microtubules and thousands of explicit motor complexes, in the spirit of Nedelec and Surrey's experiments and the Cytosim simulator. A free motor diffuses until it lands on a filament, walks toward one end, and if its second head grabs a neighbor it becomes a spring-like crosslink whose pull slows the heads (a linear force-velocity curve), speeds their release (Bell's law) and drags both filaments, which move with anisotropic drag; a grid of filament sample points keeps binding searches and steric repulsion local. Because motors linger at the plus ends, crosslinks gather those ends together and the network condenses into a field of asters with motor-packed cores. Minus-end motors focus the other end, motors that do not dwell gather a whole droplet into one centered aster, and mixed complexes zip filaments into bundles, all rendered as a widefield micrograph with tubulin in green and motors in magenta.
Try it. Click to pipette a burst of motors that grab the filaments around them. Drag to stir. The Motors and Speed sliders set motor density and stepping speed, the motor button cycles plus-end, non-dwelling, minus-end and mixed motors (or press 1 to 4), Droplet seals a fresh sample in an oil droplet (D), R reseeds, and the arrow keys nudge the sliders.
Paste this into Claude Code, Codex or any coding agent to get a simple version running, then take it wherever you like.
Build a simulation of microtubules and molecular motors self-organizing into asters, with JavaScript and the HTML canvas element. 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:
- Scatter about 300 microtubules in a wrap-around box: rigid rods about 8 units long, each with a center, an angle, a minus end and a plus end.
- Add about 2,000 motors. A free motor takes small random diffusion steps. When it comes within 0.6 units of a rod, it binds at the closest point, stored as a distance along that rod.
- A bound motor walks toward the rod's plus end at a constant speed and unbinds at a small random rate. When it reaches the end, it waits there a while before letting go.
- If a walking motor passes within reach of a second rod, it grabs that one too and becomes a crosslink: a spring between its two attachment points. Both heads keep walking, and the spring force pulls on both rods.
- Move each rod's center by its total force and turn it by its torque, each divided by a drag, plus a little jitter.
- Draw a black background, rods as thin green lines and bound motors as magenta dots, with additive blending ('lighter').
Once that works, make it beautiful:
- Put rod sample points in a grid so motors only test nearby rods, and raise the counts.
- Fake a microscope: draw a blurred, low-resolution copy of the image underneath, add faint camera grain, and draw each rod as its own stroke so overlaps get brighter.
- Let me click to drop a burst of motors, and add a slider for motor density and a toggle that makes motors walk to the minus end instead.
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 slowing motors under load, confining everything in a circular droplet, or flexible microtubules made of linked segments.