The Windmill and the Tulip Fields
A hand-painted storybook diorama come alive: a Dutch polder mill turns its sails and scoop wheel by a canal through striped tulip fields as one day passes from misty morning to golden evening and a starry, firefly-lit night.
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 "The Windmill and the Tulip Fields": a real-time 3D scene that looks like a page from a hand-painted picture book come alive, or a crafted stop-motion miniature. It should feel warm and enchanting and be beautiful from the first frame. Single self-contained HTML file; Three.js and its addons from a CDN via an import map are fine; build everything procedurally (canvas textures are fine), no external models or image files. No people anywhere. The scene (metres, y up, looking roughly north along the canal): - A gently curving canal about 11 m wide with soft grassy banks winds from the foreground to the horizon; the land on both sides rolls gently and rises into soft hills far away. - Endless tulip fields in long stripes of red, yellow, pink and purple that follow the curve of the canal, in blocks divided by narrow ditches. Close up they are thousands of instanced 3D tulips: a stem, two broad leaves and a cup of six petals (three outer, three inner) with paler tips; a few are flamed red on yellow. Further away the stripes become painted dabs of colour, then soft bands on the hills. - A Dutch polder mill on the left bank: a tapering, softly bulging octagonal thatched body on a brick base, a wooden gallery with railings, small arched windows and a green door; a rounded cap with a white beard board, a tail pole with a winch wheel reaching down to the gallery, and four lattice sails on painted stocks, partly covered with cream sailcloth. At the canal edge beside it, a scoop wheel lifts water from the ditch into the canal with a splash. - On the right bank, a brick cottage with a deep, rounded thatched roof, white window frames, green-and-white shutters, flower boxes, a warm lit window and a chimney whose smoke curls away downwind. - A little arched brick bridge with white railings across the canal; a wooden jetty with a lantern post and a rowing boat tied to it by a rope; a white duck with four yellow ducklings paddling in a line, leaving small V-shaped wakes. - Rounded lime trees behind the cottage, pollarded willows along the banks, rows of poplars and two small distant mills on the horizon, puffy clouds drifting across the sky. The mill works for real. The wind has a strength and a direction that change slowly over the day. The sails turn counter-clockwise, as seen from the front, at a speed that follows the wind; when the wind veers, the cap turns slowly to face it again; the scoop wheel turns with the sails. The smoke, the clouds and the waves that run through the tulips all move with the same wind. Each sail is twisted along its length: steeper near the shaft, flatter at the tip. The look, one coherent art direction applied to everything: - Soft toon lighting: a gentle two-step light ramp whose edge is broken up by a brush-stroke texture sampled in world space, cool lilac-blue shadows from the sky light, and a warm rim light on edges that face the sun, strongest against the light. Petals glow when backlit. - Rounded, hand-crafted shapes with charming proportions. Every surface has painted colour variation and brush grain (thatch strokes, brick courses, wooden planks) from one limited, harmonious palette. - Water: soft reflections of the mill, cottage, trees and sky from a low-resolution mirror pass, wobbled by ripples and smeared like paint, with painted light streaks, a pale line along the banks, the wakes of the ducks and the rings of the scoop wheel. - Sky: a painted gradient with a soft sun glow, stars and a crescent moon at night; aerial perspective tints the distance. - A paper finishing pass: slight wobble, darker pigment at the edges of shapes, paper grain and a warm vignette. Rich but never muddy or washed out; correct sRGB output. The day, an 80-second loop that repeats seamlessly (drive everything from wall-clock time): 1. Misty morning: a low golden sun in the north-east, mist lying in the fields, the tulips opening. 2. Bright noon: a high sun, a deep blue sky, crisp shadows; the wind veers and the cap turns to face it. 3. Golden evening: a low sun in the west rakes long shadows across the stripes; the breeze softens and the sails slow. 4. Starry dusk: a deep blue sky full of stars, the tulips closed, the cottage window and the jetty lantern glowing, fireflies drifting over the water and the fields; then a pink dawn leads back to the start. The camera drifts slowly, like a page being turned: one gentle arc across the scene that always keeps the mill, the canal and the cottage in a layered composition, never cutting. Interface: in a corner, a small caption in a storybook serif: the title and one line in a child-friendly voice that explains one thing at each moment (how the mill pumps water to keep the fields dry, why the sails are set at an angle, why the cap turns, why tulips close at night, what the fireflies are doing). It changes with a soft fade. Everything starts automatically and is visibly moving from the first frame, without any interaction; the first frame is already the full scene, with no loader or 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. - Keep it smooth on a laptop: instance the tulips, cap the pixel ratio at 2 and allocate nothing inside the frame loop. - The page runs in a sandboxed iframe without same-origin access: do not use localStorage, sessionStorage or cookies. - 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,000 to 1,400 lines, compact and well structured.