DNA Replication
A molecular-animation film of a replication fork: helicase unwinds B-DNA, topoisomerase relieves the twist, polymerases copy the leading strand and Okazaki fragments on a looping lagging strand, primase lays RNA primers and ligase seals the nicks.
Made in Claude Code (Claude subscription) with claude-opus-5.5. The agent wrote code, looked at the preview and fixed it over several iterations. This is not a single-shot result: comparisons on this site show models in one attempt.
Starting prompt
Build "DNA Replication": a looping molecular animation of a replication fork in the style of a WEHI / Drew Berry science film, rendered live in 3D. It should look like a polished scientific animation from the very first frame, never like toy primitives. Single self-contained HTML file; Three.js and its addons from a CDN via an import map are fine; build everything procedurally, with no external models, textures, images or audio. Work in nanometres. The DNA: - B-DNA with correct geometry: right-handed, 10.5 base pairs per turn, 3.4 Å rise, about 2 nm wide, with the two antiparallel strands offset by about 140° so a wide major groove and a narrow minor groove are clearly visible. - Each nucleotide is a phosphate bead and a sugar bead linked into a beaded backbone ribbon, plus a rounded base slab pointing to its partner (purines longer than pyrimidines). Bases are colour-coded A, T, G, C, with U in RNA. Parental strands are blue and violet, new DNA is gold and RNA primers are magenta. - Use instancing for all nucleotides and update them every frame. The machinery stays in place and the DNA flows through it: the parental duplex screws into the fork and the two daughter duplexes stream out behind. The replisome. Build each protein as a procedural molecular surface made of many small overlapping atoms in a smooth, blobby shell, with baked ambient occlusion and softened normals, and give each one its own colour: - Helicase: a two-tier hexameric ring at the fork. The leading-strand template threads through its central channel and the lagging-strand template is pushed outside. A wave of ATP glow runs around its six subunits. - Topoisomerase ahead of the fork, clamped around the parental duplex. The DNA between it and the helicase takes on a growing warm "over-twisted" tint. Every ten seconds it flashes, its cap swings open and the strain resets. - Leading-strand DNA polymerase, a cupped right-hand shape open towards the viewer, with a ring-shaped sliding clamp around the new duplex behind it. - The lagging strand in the trombone model: a second polymerase and clamp sit beside the leading one, and the lagging template loops out between the helicase and this polymerase. - Single-strand binding proteins (tetramers) coat every exposed single strand. They bind as strand is exposed and leave as it becomes double-stranded. - Primase parks by the helicase, rides the lagging template and lays a ten-nucleotide RNA primer one nucleotide at a time. - DNA ligase arrives at the nick between two fragments, seals it with a flash and leaves. - Free nucleotides (base, sugar and triphosphate) drift and tumble around the fork. The Okazaki cycle lasts 20 seconds and runs three times per 60-second loop. Drive everything from one film time, so that any moment can be jumped to. 1. The lagging polymerase extends its fragment from the primer, and the loop of SSB-coated single strand plus new duplex grows like a trombone slide. 2. Near the end of the cycle, primase lays the next primer close to the helicase. 3. The polymerase reaches the previous fragment, and that fragment's RNA primer turns into DNA. 4. The polymerase lets go: the loop swings out to join the lagging daughter strand, and the polymerase clamps onto the new primer. 5. Ligase seals the remaining nick. At both polymerases, matching nucleotides drift in, snap into place by complementary pairing with a short glow and release pyrophosphate. The look: - A dark blue backdrop with soft, out-of-focus molecules far behind. - Depth of field focused on the subject. - A soft key light from the top left, a cool fill and a gentle blue rim glow. - A faint depth haze. - ACES tone mapping and gentle bloom on the glows only. Never washed out. The film is a 60-second loop of eight chapters. Each has its own camera move, a title and one sentence of explanation: 1. The double helix: a close-up showing the grooves. 2. Helicase. 3. Topoisomerase. 4. Single-strand binding proteins. 5. The leading strand. 6. Primase. 7. Okazaki fragments: a wide shot of the trombone loop. 8. DNA ligase: the camera follows the nick. The film ends on a wide view of the whole fork, which flows into the opening shot. Interface: small and elegant, in a dark glass style. - The title at the top left and a compact legend for the base and strand colours. - The chapter caption at the bottom left. - A bar with play/pause and a segmented timeline; click a segment to jump to that chapter. - Labels with thin leader lines appear next to each enzyme or feature during its chapter: major and minor groove, backbone, base pairs, helicase, topoisomerase, single-strand binding proteins, polymerase, sliding clamp, incoming nucleotide, primase, RNA primer, Okazaki fragment, trombone loop, ligase and the nick. - Drag to orbit, and scroll or pinch to zoom. The camera glides back to its path about six seconds after the last input. - Everything starts by itself and is visibly moving from the first frame. On a phone the layout stacks and the camera tilts, so the fork runs diagonally across the tall screen. Engineering rules (the page must work on the first load, with no fixes): - Use Three.js r170 and only methods that exist on each of its classes. Give every custom ShaderMaterial `fog: false`, and declare every uniform, constant and varying its shaders use. - Declare each identifier once. Inside one calculation, never reuse a shared scratch vector for two values that are both still needed; use local vectors. - Guard every animated value against NaN. - The page runs in a sandboxed iframe without same-origin access, so do not use localStorage, cookies or dialogs. Cap the pixel ratio at 2 and keep it smooth, at about 60 fps on a laptop. - Answer with the complete file exactly once, in a single ```html code block: no drafts, partial snippets or notes. Keep planning brief and write the code. Aim for roughly 900 to 1,300 lines, compact and well structured. No black, untextured or placeholder objects anywhere.