Hummingbird at the Flower
A real-time 3D macro of a male ruby-throated hummingbird at trumpet vine flowers: overlapping feathers, a gorget that flashes ruby only at the right angle, wings blurred at 50 beats a second, then 40x slow motion of the figure-eight stroke and the tongue.
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 "Hummingbird at the Flower": a real-time 3D nature-documentary macro of a male ruby-throated hummingbird feeding at red trumpet flowers in a sunlit morning garden. It should look like wildlife-film footage, beautiful from the first frame, with real scale and nothing toy-like. Single self-contained HTML file; Three.js and its addons from a CDN via an import map are fine; build everything procedurally, no external models or image files. The subject (centimetres): - A male ruby-throated hummingbird, 9 cm from bill tip to tail and 3 g: a round head 1.2 cm across, a straight black needle bill 1.8 cm long, a deep chest, a forked tail 2.5 cm long, narrow blackish wings 4.3 cm long, a glossy black eye with a crisp catchlight and a small white spot behind it, tiny feet tucked into the belly. - Plumage of about 3,400 overlapping contour feathers on a lofted body, each a small curved vane with rachis and barbs, laid along the flow from bill to tail, tips lifted like shingles: tiny scale-like feathers on the crown and throat, larger ones on the back and flanks. Metallic green crown, back and rump with a golden sheen; greyish-white breast and belly with dusky green flanks; pollen on the forehead. Wings of fanned primaries; a tail of ten rectrices that fans open to brake. - The gorget is structural colour: black from most angles, each throat feather flashing ruby (orange at the peak, magenta at the edges) only when it faces the half-angle between sun and camera. At the flash moment, solve for the head pose that turns the throat into it. - Hovering: the body tilted about 45°, the wings sweeping almost horizontally about 50 times a second in a figure-eight (a 120° forward and back stroke, a small up-down deviation at twice the frequency), flipping over at each reversal so the backstroke lifts too. Motion blur: draw each wing about twenty times across a 1/60 s shutter, each copy stretched along its own sweep and faded at its edges, so at full speed the wings melt into a faint fan. - A trumpet vine (Campsis radicans) spray: seven open trumpets 7 cm long, scarlet-orange outside with fine veins, a yellow throat with red nectar guides darkening inside, five rounded lobes that flare and curl back, four stamens and a style, a leathery toothed calyx; curved buds; a woody stem; pinnate leaves of lanceolate, serrated, veined, glossy leaflets that sway in the breeze. Petals and leaves glow when backlit, the bird casts a soft shadow, dew drops sit on the leaves. The look: - A long macro lens with a shallow depth of field on the bird's eye: real depth of field from the depth buffer (a half-resolution disc gather weighted by circle of confusion), so neighbouring blooms soften and sprays behind dissolve. Draw the wing blur, the wing-tip path and the motes after it, tested against the scene depth. - The garden beyond painted in a shader, already out of focus: dark-green foliage, sunlit leaves, a few bright sky gaps, distant red blooms as soft blurs, and round bokeh discs with brighter rims that shimmer as leaves move. No sharp background, no ground plane, no people. - A warm, low morning sun from the front left, a cool sky fill, pollen motes. ACES tone mapping, gentle bloom, a soft vignette, a trace of grain: rich and luminous, never muddy or washed out. The film, a 42-second loop, one continuous camera take that tracks the bird; a one-line caption explains each moment: 1. Hovering (0 s): bill deep in a trumpet, wings a blur. "Its wings beat about 50 times a second, far too fast for a 1/60 s frame: the camera sees only a blur." 2. Structural colour (6.5 s): it draws back and raises its head; the throat flips from black to ruby. "The throat holds no red pigment: stacked platelets in its feathers reflect ruby in one direction only, so the gorget flashes on and off as the head turns." 3. Backing out (13 s): it backs out of the flower, darts to a lower bloom and fans its tail to brake. "Hummingbirds can fly backwards; to stop dead at the next bloom they fan the tail and tilt the wings." 4. Slow motion (17.5 s): time ramps down 40 times as the camera moves in; the wings beat crisply, flip at each turn, and a faint line traces each wing tip's path. "Each wing traces a figure-eight and flips over at every turn, so both strokes lift: about three quarters of the weight on the forward stroke, a quarter on the back." 5. The tongue (24 s): still slowed, at the mouth of the bloom, the forked tongue flicks out of the bill tip. "The forked tongue flicks out about 15 times a second; in nectar its fringed tips unfurl and trap the liquid." 6. Heartbeat (30.5 s): at full speed it feeds, then returns to the first flower. "In flight its heart beats up to 1,200 times a minute; a 3 g bird must refuel every few minutes." Drive the film by wall-clock time; every periodic motion closes at the loop, so it repeats seamlessly with no fade. Interface: only a small, elegant caption in the lower left (title, the moment's name, its one-line explanation) and a hairline of loop progress. Drag to look around; the view eases back a few seconds after the last input. Everything moves from the first frame on its own: no loader, no title card, no fade-in. The layout works on a phone. 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. Compile the shaders before the clock starts, cap the pixel ratio, and allocate nothing per frame. - 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 700 to 1,000 lines, compact and well structured.