
A Storybook Window on Smithfield
Phillip Harrington Dec 2026
TL;DR: The picture at the top of my Now page is my back yard, more or less, drawn to match the weather outside right now. A tiny Lambda reads the airport's weather every ten minutes and draws it: the season's tree, the real sun's shadows, the real stars and planets, the moon in its phase, sunsets, frost, lightning, and Santa on Christmas Eve. It started as thirteen pictures. Here's how it grew.
Where It Came From
Years ago Dunstan Orchard had a header on 1976design: a cartoon panorama of the view from the top of his parents' house in Dorset, swapped to match the weather there, the time of day and, at night, the phase of the moon. Ninety versions of the same scene. The sheep even moved around.
I never forgot it.
The other day I read his colophon again and wanted to try it out: something like it, for my own back yard. No big plan. It turned into one of the most fun things I've built in a long time, and it took about three days.
Who Did What
If you know me from this site, you know me as a programmer and a drummer. Not an astronomer, and not a mathematician. I had the ideas: the layers, the chairs that move, the real stars, Santa. ChatGPT drew it. Claude wrote most of the code and nearly all of the math: where the sun is, which way the shadows fall, where every star sits at 9:40 on a Tuesday night.
I know what sidereal time is. (I have a theory about Taylor Swift and synodic periods. Another day.) I couldn't program it to save my life. That's what I like about AI: I can picture a lot more than I can build, and it builds the rest. The ideas got bigger as it became clear how much help I had. This took three days. Without it I'd still be working on the moon, or more likely I'd never have started.
Part One: Pictures
Every ten minutes, a small AWS Lambda reads the latest observation from the weather station at the Johnston County airport, down the block, through the National Weather Service's free API. It turns that into four words:
- Time: day or night
- Sky: clear, cloudy, rain, storm, snow or fog
- Temperature: cold, mild, or hot (and hotter, and hottest)
- Wind: calm, windy, or a gale
Join them with hyphens, leave out the boring ones, and you have a file name: night-rain-cold-windy. If that picture exists, it goes up. If it doesn't, the picker falls back one step at a time ( night-rain-cold, then night-rain-windy, then night-rain) until it finds one that does. So you never need every combination, only the ones that look different. The first version had thirteen placeholder pictures, and the Lambda just copied the winner to /img/weather.webp.
The Art, in Layers
The art is a storybook illustration: bold ink lines, flat colors, a house on a hill with a white fence and a big tree. I made it with ChatGPT: it took my prompts and gave me art. It took a while to get the first images going and eke out the style and the basic details I wanted. After that it was one piece at a time, from a long, very specific prompt: the same paragraph of context every time, then the one thing I wanted, then the whole list of pieces so it knew where we were. (The prompts are in the repo.)
The trick was to stop asking for whole pictures and ask for layers instead: a base with the house and the yard and no tree, the trees on their own (summer, fall, bare, windy), the rain, the clouds, the chairs, the dogs. A build script stacks them with ImageMagick. One new layer makes a dozen new pictures. Thirteen pictures became thirty-eight, then seventy, then ninety-six, and most of them I never drew.
Some of the layers are made, not drawn. There's one daytime drawing of each tree. The night one is the day one with the leaves darkened, the trunk's shadow side darkened more, and a warm rim of porch light along the right edge, all by amounts I measured off a lit night tree ChatGPT drew once.
Same for the rest: a rainy or foggy sky is a color gradient painted over the day sky, fog is noise stretched sideways, and a hot day is the day picture with the grass sun-bleached, by amounts measured off a hot picture ChatGPT drew.
The date picks the tree, not the temperature (trees don't drop their leaves on a cold day and grow them back on a warm one), so each season got its own folder of pictures. Some pictures got alternates, like the dogs out in the yard on nice days, and the picker takes turns between them by the hour. Fall got leaves on the grass, sometimes raked into a pile.
The Lambda Starts Drawing
For a while every picture was finished ahead of time, chairs and all. That's fine until you want the chairs to move. If the chairs are baked in, they jump every time the weather changes. So the pictures were split in two: an under (everything behind the yard things) and an over (whatever falls in front of them: the tree, rain, fog, snow). The Lambda draws the yard things between the two, with sharp:
- The chairs move once a day, like somebody moved them: both left of the steps, both right of the grill, one on each side, or out on the lawn.
- The dogs move once an hour, and never in front of the fence.
- The cushions blow off the chairs and down the hill in a gale (30 mph, or gusts of 40), land somewhere new each time, and stay put until the wind is all the way back to calm.
The chairs and dogs get shadows from the real sun, too. The Lambda works out where the sun is over Smithfield right then and casts each thing's outline along the ground. In December the sun rises in the southeast, behind us, and the shadows lean up and to the left all morning. I thought that one was a bug. It isn't.
That was the first version: about a hundred pictures, a picker, and a Lambda that moved the furniture.
Part Two: "If We Were Smart About It"
Then I asked Claude, more or less: back to front, what are the layers of this whole thing? Like, if we were smart about it, what would we have done? I listed the ones I could think of: sky color, stars, the moon, clouds, the far hills and the fence, the yard, the house in a day and a night version, things on the roof (Santa, which I wrote as "SANNNTAAAAAA!!!!"), the patio, the bushes, the chairs and the dogs, the front fence, the tree, the rain and the wind.
That's more or less what it is now. The pictures stopped being pictures and became recipes.
Masks
Most of it runs on masks: a black-and-white picture that says "this part." Some the script finds by color, like the sky (everything close to the day sky's blue). For the rest I asked ChatGPT for a copy of the base with one thing painted solid magenta: the house, the far trees, the front fence, the window glass. Nothing in the scene is magenta, so the script can pick it out. They line up with the base to the pixel. A few needed cleanup: ChatGPT left its own ink lines inside the magenta, and missed the chimney once.
The masks let the scene come apart. The snow pictures used to be their own drawings, and ChatGPT drew their windows a few pixels off. Now snow is layers laid over the regular base (snow on the far trees, the yard, the roof, the bushes) with the front fence cut out by its mask and laid back on top. The snow for the fence tops was drawn a little wider than the fence, unevenly, so the script cuts it at each post and stretches each piece to fit.
The Scene
The build script still makes the backgrounds, but as it builds each one it writes down the recipe as steps: start from this base, paint this sky through this mask, lay on these layers. Those steps go in a manifest, and the pieces they name go up as parts. The Lambda follows the steps and draws the background itself. I checked all ninety-six against the build's own pictures, and they match to within a shade. The prebuilt pictures are still there, as the fallback.
Which means the Lambda can add steps the build never knew about, and that's where Part Three comes from.
The Rooms
Through the windows you can see inside: a living room with a lamp on the left, the kitchen through the glass doors, a study with a desk and a plant on the right. ChatGPT drew them as three framed windows about three times too big. The script cuts each room inside its frame, fits it to its window's glass, and shows it only through the glass mask, so the house's own frames stay in front. At night the rooms are lit, warmer and brighter.
That broke something: the sky mask had been catching the window glass, because the glass reflects the sky's blue. Fine, until rainy skies started painting grey over the rooms. The sky mask leaves the glass out now.
The Light
A sunset used to mean a sunset picture. Now it's light, worked out from the sun's height each time the Lambda draws. When the sun is low, a gold-to-pink glow rises along the horizon on its side (left at sunset, right at sunrise), kept to the sky by the mask, and everything but the sky gets a little warmer. After sunset, a twilight glow fades out over the night sky.
And the lights come on. ChatGPT drew a glow map: just the lights, on black (the windows, the porch lights, the warm spill on the grass). As the sun goes down, the Lambda adds it to the day picture as light, a little more each time, rain or shine.
The Moon
On clear nights the moon is up, in its phase. The phase is arithmetic: days since a known new moon, divided by the 29.53-day month, rounded to the nearest of eight drawings, all cut by the build from one full moon. A full moon in October is the harvest moon, orange. I checked the phase against the Naval Observatory's table once, when it showed a half moon and the internet said "waning gibbous." It was 52% lit, a few hours from exactly half.
Part Three: A Little Wild
Once the Lambda was drawing everything, every new idea was a layer and a rule, not a stack of new pictures. So the ideas kept coming. It's the same four words from Part One, turned way up. The picture changes every ten minutes now, and everything in it changes, too.
The Real Stars and Planets
The night picture came with painted stars, the same every night. Now they're real: about 230 of the brighter stars, where they really are for the date and the time. The Big Dipper wheels around the pole through the night and the year.
The planets are worked out from their orbits too: Mars, Jupiter and Saturn, seen from here, drawn bigger, in their colors (red, cream, pale gold), with a glow. Venus is the evening star on the left between the tree and the house, or the morning star over the trees on the right. As I write this, it's the morning star.
Weather You Can See
- Wet: while it rains and for three hours after, the grass goes dark and there are puddles out front.
- Frost at 34°F or colder before 10 in the morning.
- High clouds on partly cloudy days.
- Wind: wisps of it on windy days, and in the fall, leaves blowing past, downwind.
- Chimney smoke when it's cold or snowing: straight up when it's calm, leaning with a breeze, flat in a gale, and blown the way the wind is actually blowing.
- Lightning in about half the storm pictures, a new bolt each time, with a faint flash.
And Everything Else
- Fly-bys: now and then a plane, a V of birds, a bird or two, and about one hour in a dozen, a blimp drifting across. Never over the house, mostly small and far away, except the occasional plane coming in low, because the airport is down the block.
- Trash day: the carts are out front on Friday mornings, 7 to 10, leaning a little.
- Fireworks on the Fourth of July and New Year's Eve.
- Santa on Christmas Eve: the sleigh flies across the sky from 6 to midnight, and then he's in the chimney, with the sleigh and the reindeer parked on the roof, until 6 in the morning. No smoke while he's in there.
The Storybook and the Real Thing
It's not a picture of my house, exactly. I never gave ChatGPT a reference photo, and here's how it came out:
- The tree. The picture has a big tree on the left, just outside the fence. The real one is a sapling, about as tall as the fence, out front by the driveway.
- The fence. White pickets in the picture. In real life it's a wood privacy fence around the back yard, which is generous: the yard runs downhill to the back and right, so anybody on the cross street can see right in.
- The house. Close, but not it: no wing on the left, and the covered back porch in the middle under its own gable. And no bushes in the back.
- The yard. The picture's lawn is greener than mine has ever been. The two chairs came from the listing photos. Out back there's really a handful of zero-gravity lounge chairs, a few folding ones, and a wicker couch, whose cushions really are the ones that blow down the hill.
- The direction. The sky (the stars, the sun's shadows, which side the sunset glows on) is worked out looking 10° east of north. From above, the view's really more like 40°, northeast. I haven't changed it.
And then there's the sky. It's supposed to look like a storybook, and that won over the math more than once:
- The moon. The real one rises, crosses the sky and sets, and most nights it would be long gone out of the frame. Ours sits in the same spot all night, because that's where it looks good.
- The stars. The picture is very wide, and the first try left the outer quarters of it underground, as far as the math was concerned. So the sky got stretched like a map of the world: the horizon flat along the treeline, north in the middle, and the edges looking much further south than any real window could.
- The planets. They ride the southern sky, usually high or behind us, so most of the time their real spot isn't in the picture. When one's up, it gets moved into the open sky on its side: east on the right, west on the left, as high as it really is.
So there's a lot of real math in here, and then a lot of the time we ignored it. Real where it's fun, storybook where the real thing gets in the way.
How It Runs
- A Lambda on a schedule, every ten minutes, with sharp bundled for drawing. It writes two files: the picture, and a little JSON with what it picked and the alt text. It only draws when something changed.
- If the airport's report is more than three hours old, it tries Harnett County, then Goldsboro, then Raleigh-Durham. If none are fresh, it leaves the picture alone.
- The build script is bash and ImageMagick, and takes about four minutes to make everything. The Lambda's logic is plain JavaScript with no AWS in it, so the tests run in a second.
The code is all open:
- cloud/weather: the Lambda.
app.mjspicks the picture,things.mjsplaces everything (the sun, the shadows, the light, Venus, the fly-bys),stars.mjshas the stars and the planets,scene.mjsdraws the background from its steps,render.mjsputs it all together. - scripts/weather-images.sh: the build.
- docs/weather-variants.md: every picture, every rule.
What I Learned
Ask for layers instead of pictures. Measure instead of guessing (the night tree's colors, the hot grass, where the fence posts really are). When something looks like a bug, check the sky first: the December shadows, the half moon that was technically gibbous. And when the math says the edges of your picture are underground, change the map.
Layers make the intersections cheap
If you want a picture for every combination of things, don't draw the combinations. Draw the things, one layer each, and let a script stack them, so adding one thing is one drawing instead of a dozen. Better yet, let the program do the stacking live. Then there's no set of pictures at all: the weather, the clock and the sky make a new one every ten minutes, and it's never quite the same twice.










