I Call Window Seat
Download on the App Store
← How it worksHow a chalet is drawn
Window Seat · Alps by Train

How a chalet is drawn

Window Seat has no picture files for its scenery: no PNGs, no SVGs, no photos. Every building, tree and cloud is a short program that draws it from simple shapes as the train reaches it. That's what lets the world change with the season, light its windows at night, and never repeat.

A dark log chalet with green shutters and red geraniums in window boxes, in a meadow below the mountains
One chalet as it appears out the window.
// 2. Ground floor, timber (or plastered) storeys.
if p.ground == .stone {
    AlpsArch.wall(&s, AlpsWallLook(mat: .stone, ink: g.chance(0.7) ? ALInk.granite : ALInk.lightStone, wear: p.wear), 0, W, 0, groundH, &g)
} else {
    AlpsArch.base(&s, -0.05, W + 0.05, 0.45, &g)
    AlpsArch.wall(&s, AlpsWallLook(mat: .plaster, ink: g.chance(0.6) ? 10 : ALInk.plasterCream, wear: p.wear), 0, W, 0.45, groundH, &g)
}
if wallTop > groundH + 0.2 { AlpsArch.wall(&s, clad, 0, W, groundH, wallTop, &g, corners: clad.mat == .logs) }
s.hline("sill beam", .wood, -0.15, W + 0.15, groundH, 0.16, ink: p.cladding == .plaster ? wk : ALInk.woodDark)

// 3. Ground floor openings: the door in one column, small windows in the others.
let cols = Self.columns(W, p.rhythm)
let groundCols = p.rhythm == .ribbon ? Self.columns(W, .even) : cols
let doorCol = g.int(0, groundCols.count - 1)
let gy = p.ground == .stone ? 0.05 : 0.45
var ground = style; ground.slats = false
for (i, c) in groundCols.enumerated() {
    if i == doorCol {
        AlpsArch.door(&s, c.x - 0.5, gy, 1.0, min(2.05, groundH - gy - 0.2), lit: g.chance(p.lit), &g, ink: ALInk.woodAged,
                      arched: p.ground == .stone && g.chance(0.4), anchor: true)
    } else {
        let w = min(c.w, 1.2)
        AlpsArch.window(&s, c.x - w / 2, 1.05, w, min(0.9, groundH - 1.35), lit: g.chance(p.lit), &g, boxed(ground, share * 0.5))
    }
}
From AlpsChalet.swift: the stone or plastered ground floor, the timber storeys above, and where the door and windows go.

One recipe, many chalets

The same code makes every chalet on the line. Each one rolls its own choices: which way it faces, how many floors, the wood, the roof, the shutters, a woodshed or a barn, flower boxes that bloom with the season.

A chalet drawn by the same code with different choices
A chalet drawn by the same code with different choices
A chalet drawn by the same code with different choices
A chalet drawn by the same code with different choices
A chalet drawn by the same code with different choices
A chalet drawn by the same code with different choices
let vocabulary = Vocab()
    .c("view", View.self).c("wood", Wood.self).c("ground", Ground.self).c("cladding", Cladding.self)
    .c("roof", AlpsRoofKnob.self).c("shutters", AlpsShutter.self).c("annex", Annex.self).c("balconyAt", BalconyAt.self)
    .c("rhythm", Rhythm.self)
    .yn("stones", "carved", "boxes", "woodpile", "chimney", "dormer")
    .r("balconies", 0, 2).r("floors", 1, 3).r("width", 7, 16).r("slope", 0.28, 0.8).r("eave", 0.9, 2.2).r("wear", 0, 1).r("lit", 0, 1)
    .build
The choices a chalet can make. A village rolls them so no two neighbours come out alike.

How it's made

The code is grown in a cycle between people and AI (in this case, Claude Code). Each rail line I choose begins with research on what belongs out the window: the buildings, trees, animals, boats and stories. The AI writes the code for each object; I look at it on a review stage that shows one thing at a time, with wind, time of day and camera tilt on sliders, and leave notes like "animate the goat's head lifting, add a baby goat in the same style, and draw the hooves more clearly." The AI works the notes into the code, and I look again. So far that's many hundreds of objects coded, reviewed, and coded again.

Where does the AI's sense of how to code a chalet come from? Is it using someone's art?

I can't see Claude's training data, but it's trained on a huge amount of text and images: writing about architecture (Kniestock, Quergiebel and the half-hip roof in this code are real Alpine building terms), travel writing and photos, drawing tutorials, and a lot of graphics code. Art made by people is in there too. So its sense of what a chalet looks like comes from people's work, mostly people describing, photographing and building real chalets, and some of them artists.

What it didn't do: it didn't look up an illustration and trace it, no image model produced pixels, and it wasn't instructed to copy a particular artist's style or a genre of art. It wrote a recipe in terms of walls, beams, windows and flower boxes, the way someone who has seen a lot of chalets could describe one to a draughtsman. Then the work was a loop: render it, look at it, critique it against my notes ("too regular", "two neighbours look alike"), adjust the code. Much of the look comes from that loop and from the vocabulary of building blocks it grew over the weeks, which is why it has a consistent, slightly plain drawn style. The look comes from the code's own vocabulary of shapes: walls, beams, shutters, window boxes. That's why it reads as a simple drawn style rather than an illustration.

So it sits somewhere between using the works of people, from coders to architects to artists, and inventing from nothing: closer to a person drawing from memory, except the memory came from training on other people's work. Because the work lives as code, and it's made by Claude and me creating together, it's a relatively different, unique medium: one that could not exist without the works of people at the heart of AI training data, nor without me in the loop, authoring and shaping the aesthetic.

If you have more questions about the technology or the ethics around this, please reach out; I'd be glad to have a discussion.

Josh Lannin, developer of Window Seat