Falcon 9 booster landing
A Falcon 9 first stage lands on a drone ship in real time: terminal-velocity coast, a one-engine hoverslam it cannot hover out of, legs out seconds before touchdown, live telemetry from the simulated state. Built with Claude Opus 5.5, refined by Claude Fable 5.2.
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 a breathtaking, physically simulated 3D film of the most admired moment in spaceflight: a Falcon 9 first stage landing on an autonomous drone ship in the open ocean at golden hour. It must look and behave right to people who fly these boosters. One self-contained HTML file; Three.js from a CDN via an import map and one Google Font are fine; everything procedural, no external textures or models. No people, logos or brand lettering; one small line "Fan tribute. Not affiliated with SpaceX." Physics (simulated, not keyframed; real time throughout, no slow motion): - A 6-degree-of-freedom rigid body on a fixed 1/240 s step: mass, inertia, gravity, Mach-dependent drag, gusty wind, propellant flow from thrust and specific impulse. - Start in the coast: engines first at terminal velocity (drag equals weight, so the g-load reads 1.0), about 1.9 km up, some 35 m off the ship's centre, grid fins holding the stage against the airflow. - One centre engine lights at the last moment that still lets a planned ~64 % throttle stop the stage on the deck, with a brief green igniter flash and a short start-up ramp. The engine cannot throttle below 40 %, so thrust always exceeds weight: this is a hoverslam, not a hover. - The throttle is re-solved continuously by integrating the remaining burn (thrust lag, drag, falling mass), so that the lowest foot meets the heaving deck at about 1 m/s. Aim for a small touchdown speed, not zero; cut the engine at first contact. - Gimbal (with travel and slew limits) and grid fins share the attitude torque; fin authority fades with dynamic pressure. A position loop tilts the stage a few degrees to divert over the deck centre, then stands it upright. - The four legs swing down only about three seconds before touchdown. Each is a shock strut with deck friction and a crush core; the stage settles and rides the ship's motion. - The drone ship (deck about 91 x 52 m) heaves, pitches and rolls on the same swell the ocean shows. Vehicle and ship: - The stage is about 47 m tall and 3.7 m across: white tank with weld rings, a sooty lower half and a cleaner oxygen tank above where frost protected it, black interstage, raceway, four titanium grid fins lying flat in the airflow, lattice visible, that visibly steer; an octaweb with nine engine bells (the centre one gimbals and glows); four black carbon legs spanning about 18 m, sloping about 35° below horizontal, with telescoping struts; nitrogen thrusters that puff at the top to stop the roll and help the divert. - The ship must look heavy and wet: a real hull sitting 4 m deep in the water, flaring out under the deck wings, with a waterline band, rust streaks, and foam wash along its sides and at the thruster corners. On deck: dark weathered plating with a worn circle-and-cross target and radial scorch marks, a blast wall at each end with containers, tanks and generators behind, railings, masts, an antenna dome and deck lights. Flame, smoke and light: - A raymarched kerosene-and-oxygen plume: white-hot core with faint shock diamonds at the nozzle, a long luminous orange flame, a ragged tail. It lights the booster, the deck and the smoke from below. - The exhaust reaches the deck from about 90 m up and floods it: streaked fire spreading radially, a fast sheet of steam along the plating, dense rolling grey-brown smoke lit orange from inside, spray torn off the deck edges and the whitened sea around the hull. Lit billboards fade softly where they meet deck and sea (no hard cuts); the cloud lingers and drifts downwind after cut-off. Heat shimmer bends the picture around the flame. After cut-off the bell stays red-hot, residual kerosene burns around the bells, and oxygen boil-off drifts from a vent high on the body. - Golden hour with the sun 5° above the sea: a deep sunset sky with soft, large cloud forms in three layers (no fine marbled noise), dark-cored and bright-edged toward the sun, horizon cloud banks, a crisp sun disc and a glitter path. An FFT ocean with swell, foam, Fresnel sky reflection and haze. ACES tone mapping, sun shadows, restrained bloom; never washed out, never a dark mush. Film (cuts follow the simulation; about 31 seconds, then it loops by cutting back to the first shot): 1. Tracking camera, long lens: the sunlit stage falling against streaming clouds, the operator a little behind it; ignition. 2. Onboard camera on the interstage, looking down past a grid fin's lattice along the body to the engine glow and the tiny ship. 3. Tracking camera looking into the sunset: the silhouetted stage and its flame coming down past the sun. 4. Deck-level camera, close and low: looks up at the octaweb and nine bells as the legs deploy, tilts down with the stage until it fills the frame, and holds through the touchdown as fire and cloud flood the deck. 5. Tracking camera low over the sea: the whole stage on the ship, the cloud drifting away. 6. An aerial orbit that slowly pushes in on the stage, the sun and its glitter path behind. Drag to look around; the film resumes after a few seconds. Interface: a small, elegant caption (title and flight phase), the camera name, and one thin row of telemetry read straight from the simulation: altitude above the deck (m), speed (m/s), throttle (%), mass (t), g-load, and time to touchdown (after landing: touchdown speed). Nothing covers the vehicle. Works on a phone (390 x 844). 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. - Drive the film from the wall clock (performance.now), never a frame-capped step. Compile all shaders and render every camera once before the first visible frame: the first shot, moving, no loader or fade. Cap the pixel ratio at 1.5; step it down if the frame rate drops. - The page runs inside `<iframe sandbox="allow-scripts">`: no storage, cookies, alerts or navigation. - Guard the simulation against NaN and runaway values; it must not reset itself before the booster has landed. - 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 1,100 to 1,400 lines, compact and well structured.