Gallery L (polygons) — an ArchLang floor plan example
A floor whose spaces are not rectangles: an L-shaped gallery whose area is its exact ring area, not its box.
This plan compiles to 2 rooms, 153 m² of floor area and 1 window; every room is reachable from the entrance.
What this plan uses
The parts of the language this plan's source writes, each linked to its section of the language reference.
- Paper and scale
- Walls
- Rooms
- Polygonal rooms
- Doors
- Windows
- Furniture
- Dimensions
- Automatic dimension chains
- Title block
- Theming
The source
This is the whole plan. The drawing above is what the compiler produced from it — nothing was drawn by hand.
# Polygonal rooms (v1.23): a floor whose spaces are not rectangles.
#
# `room polygon (x,y) …` gives a room an explicit, implicitly-closed ring instead of
# `at` + `size`. Two shapes a rectangle cannot express are drawn here:
#
# · gallery — an L, wrapping the entrance hall on two sides. Its area (132 m²) is the
# exact shoelace area of the ring, not its 12 × 14 m bounding box.
# · lobby — a trapezoid, so the building has an angled south-west facade. The joint
# where that facade meets the south wall is 40°, which is what the wall outline's
# mitre cap is there for.
#
# Everything else is ordinary: the walls, the doors and `dims auto` neither know nor
# care that a room is polygonal.
plan "Gallery L" {
units mm
grid 100
paper A3 landscape
north up
theme presentation
dims auto all
title { project "Polygon rooms" drawn_by "ArchLang" }
wall exterior thickness 300 {
(0,0) (12000,0) (12000,9000) (6000,14000) (0,14000) close
}
wall id=spine partition thickness 200 { (6000,8000) (6000,14000) }
wall id=north_face partition thickness 200 { (6000,8000) (12000,8000) }
room id=gallery polygon (0,0) (12000,0) (12000,8000) (6000,8000) (6000,14000) (0,14000)
label "Gallery"
room id=lobby polygon (6000,8000) (12000,8000) (12000,9000) (6000,14000)
label "Lobby" at (8200,10200) uses entry
# The entrance sits on the ANGLED south-west facade, so it opens into the trapezoid
# lobby — a door on a wall that is not axis-aligned, hosted the ordinary way.
door id=entry double on exterior at 51% width 2000 swing in
# The facade chains measure along x and y, so none can tick a door on the angled face;
# `lint` reports it (W_OPENING_NOT_DIMENSIONED) until it is dimensioned by hand. This
# one is drawn ON the opening, jamb to jamb (offset 0): 1000 mm either side of the door's
# centre (9000,11500) along the 6:5 facade, so the line spans the 2000 it is lettered. The
# pair is 2000 wide because a person passes through one leaf: 1000 mm leaves.
dim (8231.78,12140.18)->(9768.22,10859.82) offset 0 text "2000"
door id=inner on spine at 50% width 1200 hinge left swing in
window id=north_light on exterior at 20% width 3000
# ---- fit-out ----------------------------------------------------------------
# An L takes an anchor on a side (E_PLACE_POLY in a notch — never the box),
# but none of these stands there, so each is an absolute `at`, kept clear of the
# L's missing quadrant (x 6000-12000, y 8000-14000 is the lobby's, not the
# gallery's) and of the two doors' swing quarter-discs.
furniture bench at (2000,2000) size 1800x500 in gallery
furniture bench at (8000,2000) size 1800x500 in gallery
furniture plant at (10500,6500) size 700x700 in gallery
furniture plant at (1000,12800) size 700x700 in gallery
furniture desk at (2000,11000) size 1800x800 label "Reception desk" in gallery
furniture chair at (4200,11500) size 500x500 rotate 90 in gallery
}
More in Geometry & experiments
- Hexagon Pavilion: A hexagonal pavilion: six trapezoidal galleries ringing a circular rotunda, with nothing rectangular anywhere.
- Terrace Row (mirror): A row of four terrace dwellings generated from one component, placed four times and mirrored in pairs.