House 2
A real two-story house written from photos of its outside and a few facts about its inside: the porch, garage, half bath and front door are where they are, and the other rooms are guesses.
// A real two-story house, from a photo of its front, an aerial view (both
// kept out of the repository) and a sketch of its two floors
// (real-floorplans/house-2-floorplan.png). Up is north in the aerial, and
// the street is to the north: the front faces north. The sketch has north
// at the bottom, so east is on its left.
//
// About 2300 sq ft, three bedrooms, an office and two and a half baths.
// Every statement here is true of the real house, except those marked
// `guess`, so the plan this compiles to can be compared with the sketch.
// Where the two differ, the language or the solver falls short:
// docs/real-houses.md lists how.
//
// Sizes are estimates. The sketch shows where the rooms are, not how big:
// it draws both floors square. Read off the photo (the garage is about 0.36
// of the front) and the aerial (the block behind the porch about 1.3 times
// as deep as it is wide, the porch about a fifth of that again), the house
// is about 31 ft wide and 41 ft deep, with a porch about 7 ft deep in front.
// Each room's size is its share of the sketch applied to that block.
house "House 2" {
front north // the street is to the north
area ~ 2300sqft // heated: not the garage or porch
// A side-gabled roof: its ridge runs east-west, parallel to the street,
// the whole length of the house (the aerial shows no hips), with gable
// ends east and west and cornice returns at their eaves. Steeper than
// the porch roof below; 8/12 is a guess.
// Not said: the cornice returns.
roof gable east west pitch 8/12
// Two gabled dormers on the north slope, over the front windows. They
// light the attic, not the bedrooms, which have flat ceilings.
dormers 2 north
story main {
outline rectangle // the porch and garage in it
width ~ 31ft
depth ~ 48ft // the porch's 7 ft included
// The porch roof runs the whole front, the garage's included: a low
// roof against the wall above, hipped at its ends, with a small gable
// over the front door.
// Not said: that the gable is steeper than the porch roof. Its roof
// has the porch roof's pitch.
roof hip pitch 4/12
gable north over entry
// A covered porch on round columns, from the east end of the house to
// the garage, open to the north. The office and the half bath take
// their light through it.
room porch: "porch" northeast unheated {
area ~ 150sqft, depth ~ 7ft
open north
door_to entry // the front door
open_to drive // one porch: no wall between
}
// The porch roof runs on in front of the garage door, over the
// driveway, to a column at the west end.
room drive: "drive" northwest unheated {
depth ~ 7ft
open north west
}
// The northeast corner behind the porch, with three windows onto it.
// Its corner toward the front door is cut off at 45°, with its door in
// that wall, facing the entry. How far the cut runs is a guess.
room office: office east {
area ~ 130sqft
cut southwest 4ft // guess: the length
door_to entry southwest // the door, in the cut
adjacent porch
}
// A heated one-car garage at the west end of the front, under the upper
// story. Its overhead door is under the porch roof, and a door in its
// east wall opens to the entry, between the stair and the half bath.
// Not said: that it is heated. A garage is always unheated.
room garage: garage west {
cars 1 from north
door_to drive north overhead // the overhead door
area ~ 240sqft, width ~ 12ft, depth ~ 21ft // about half the house
door_to entry east
}
// Everything else downstairs is one space, with no walls in it: the
// living room across the back at the east, the kitchen at the west,
// the dining room down the east side, and the entry from the front
// door back to them, past the garage door and the stair.
open great {
room living: living southeast {
area ~ 250sqft
door south // in the middle of the back wall
}
room kitchen: kitchen southwest { area ~ 250sqft }
room dining: dining east { area ~ 180sqft }
room entry: entry {
area ~ 90sqft
// Behind the small window west of the front door, its door in
// its east wall.
room powder: half_bath at northwest {
area ~ 40sqft
adjacent porch, adjacent garage
}
}
}
// The stair stands in the open space, which wraps round it: you step
// onto it from the living room and climb north, the kitchen and then
// the garage's east wall along its west side. So its top end, and the
// closet door there, face the entry, not the garage.
living open_to stair1
kitchen adjacent stair1
garage adjacent stair1 east
}
story upper {
// Five windows across the front, evenly spaced, the westmost over the
// garage: the upper story covers the whole house but the porch.
over garage, office, great
outline rectangle
width ~ 31ft
depth ~ 41ft
// The primary suite across the back at the west. Its bath and walk-in
// closet run side by side from it north to the loft, the bath against
// the west wall and the closet against the stair. A door from the
// bedroom to each.
room primary: bedroom southwest { area ~ 190sqft, door_to hall }
room primary_bath: bathroom west {
area ~ 100sqft, door_to primary
adjacent loft // it runs north to the loft
}
room primary_closet: closet {
area ~ 70sqft, door_to primary
adjacent primary_bath, adjacent stair1
adjacent loft
}
// Down the east side from the back: a bedroom and its closet, the hall
// bath, a closet with the washer and dryer, and the front bedroom.
room bed2: bedroom southeast {
area ~ 140sqft, door_to hall
closet at northeast { door sliding } // its door in the closet's south wall
}
// guess: the full bath with a tub. The sketch says only "bathroom".
room bath: bathroom east {
area ~ 50sqft, door_to hall
prefer adjacent bed2
}
// The sketch calls it a closet; the laundry is upstairs, and this is
// where it is.
room laundry: laundry east {
area ~ 35sqft, door_to hall
adjacent bath
}
room bed3: bedroom northeast {
area ~ 165sqft
door_to loft west
closet along south { door sliding } // the width of the room
}
// The rest is open: a loft across the front, over the garage, and the
// walk from it past the stair to the bedrooms at the back. The stair
// comes up in it, so it stands in it, the hall beside it.
open upstairs {
room loft: living northwest {
area ~ 300sqft
open_to stair1 // the head of the stair
}
room hall: hall { area ~ 120sqft }
}
}
// In the middle of the house, rising north from the living room to the
// loft. It opens into an open space on both stories, so it stands in
// each: their rooms wrap round it. The space under it is a closet, its
// door at the north end, onto the entry.
stair stair1: main -> upper { up north, closet }
}