Library Pavilion (2 levels) — an ArchLang floor plan example
A two-storey corner library round a double-height circular reading room ringed by eight columns that carry the gallery above.
Level 1 (Ground floor) compiles to 9 rooms, 300 m² of floor area and 14 windows; every room is reachable from the entrance.
This is a 2-level plan: a storey is a drawing, so the compiler produces one sheet per level and the drawing above is level 1. The command line writes one file per level, and the playground's preview has a storey switcher. Each storey measures:
- Level 1 (Ground floor) — 9 rooms, 300 m² of floor area, 14 windows.
- Level 2 (Upper floor) — 10 rooms, 300 m² of floor area, 13 windows.
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
- Site and orientation
- The lot line (boundary)
- Bindings (let)
- Control flow (for, if, while)
- Walls
- Rooms
- Polygonal rooms
- Curved walls (arc edges)
- Circular rooms
- Doors
- Windows
- Openings
- Furniture
- Dimensions
- Columns
- Stairs, elevators and escalators
- Roofs (the eaves line)
- Voids
- Outdoor ground
- Title block
- Positioning axes
- Sheet tables (schedules, legend, notes)
- Levels (storeys)
- Zones
The source
This is the whole plan. The drawing above is what the compiler produced from it — nothing was drawn by hand.
# Library Pavilion: a small two-storey public library on a street corner. The heart is a round,
# double-height reading room (a concrete drum, R4500) ringed by eight columns that carry the
# gallery floor above. Its north half is wrapped by study carrels along the north light, its
# south half by the entrance and lending hall. The west wing holds the children's library and
# a cafe corner that opens onto a terrace; the east wing holds the staff work room, the
# accessible WCs and the concrete core with the public stair and the lift. Upstairs a gallery
# runs round the void over the reading room, with study rooms and group rooms in the wings.
plan "Library Pavilion" {
units mm
grid 50
paper A3 portrait
scale 1:100
north up
schedule rooms
site {
street south
hemisphere north
boundary (-3300,-3500) (23300,-3500) (23300,18500) (-3300,18500)
}
axes {
x at 0, 5000, 14000, 20000
y at 0, 6500, 15000
}
# An east-west cut through the reading room, its gallery and both wings, looking north.
section A (-1500,4300)->(21500,4300) look north
# =====================================================================================
# GROUND FLOOR
# =====================================================================================
level 1 "Ground floor" height 3500 {
# ---- walls: a brick shell, a concrete drum and core, tiled WC partitions ----
wall id=shell exterior thickness 300 material brick { (0,0) (20000,0) (20000,15000) (0,15000) close }
wall id=w_west partition thickness 100 { (5000,0) (5000,15000) }
wall id=w_east partition thickness 100 { (14000,0) (14000,15000) }
wall id=w_child partition thickness 100 { (0,9500) (5000,9500) }
wall id=w_staff partition thickness 200 material concrete { (14000,6500) (20000,6500) }
wall id=w_core partition thickness 200 material concrete { (17500,6500) (17500,11500) (20000,11500) }
wall id=w_wc partition thickness 100 material tile { (17500,9000) (20000,9000) }
# The drum: eight arcs at R4500 (2700/3600 is a 3-4-5 triple), walked east, north, west,
# south, so its north point is at 25% of the run and its south point at 75%.
wall id=w_drum partition thickness 300 material concrete {
(14000,6500)
arc (12200,2900) radius 4500
arc (9500,2000) radius 4500
arc (6800,2900) radius 4500
arc (5000,6500) radius 4500
arc (6800,10100) radius 4500
arc (9500,11000) radius 4500
arc (12200,10100) radius 4500
arc (14000,6500) radius 4500
}
zone public "Public" {
room id=r_read circle at (9500,6500) radius 4500 label "Reading room" at (9500,6550) uses hall floor timber
room id=r_carrels polygon (5000,0) (14000,0) (14000,6500) arc (9500,2000) radius 4500 arc (5000,6500) radius 4500
label "Study carrels" at (9500,1000) uses office floor carpeting
room id=r_hall polygon (5000,6500) arc (9500,11000) radius 4500 arc (14000,6500) radius 4500 (14000,15000) (5000,15000)
label "Entrance / lending" at (7300,12800) uses entry hall floor stone
room id=r_child at (0,0) size 5000x9500 label "Children's library" uses office floor carpeting
room id=r_cafe at (0,9500) size 5000x5500 label "Cafe" uses dining floor tile
}
zone core "Core and services" {
room id=r_core polygon (14000,6500) (17500,6500) (17500,11500) (20000,11500) (20000,15000) (14000,15000)
label "Stair hall" at (15200,10500) uses circulation floor concrete
room id=r_wc1 at (17500,6500) size 2500x2500 label "Accessible WC" uses wc floor tile
room id=r_wc2 at (17500,9000) size 2500x2500 label "Accessible WC" uses wc floor tile
}
zone staff "Staff" {
room id=r_staff at (14000,0) size 6000x6500 label "Staff work room" uses office floor carpeting
}
# ---- the ring of eight columns at R3300 under the gallery floor, turned 22.5 deg off the
# axes so the north and south thresholds stay clear ----
let CX = [12350, 12350, 6250, 6250, 10550, 10550, 8050, 8050]
let CY = [5050, 7550, 5050, 7550, 3250, 9350, 3250, 9350]
for i in 0..8 {
column at (CX[i], CY[i]) size 400x400
}
# ---- vertical circulation: a dog-leg public stair and the lift ----
stair id=st dir up width 1400 {
flight at (15950,13450) size 2500x1400
landing at (18450,11950) size 1400x2900
flight at (15950,11950) size 2500x1400
}
elevator id=lift at (14200,6650) size 1800x2000
# ---- doors and openings ----
door id=d_main double at (9500,15000) wall shell width 2000 swing into r_hall
door id=d_read double on w_drum at 75% width 1800 swing into r_read
opening id=o_carrels on w_drum at 25% width 1500
door id=d_child on w_west at 8700 width 1000 swing into r_child
opening id=o_cafe on w_west at 12250 width 3000
door id=d_child_cafe on w_child at 4300 width 900 swing into r_cafe
opening id=o_core on w_east at 11000 width 3000
door id=d_staff on w_staff at 2750 width 900 swing into r_staff
door id=d_staff_carrels on w_east at 3500 width 900 swing into r_staff
door id=d_staff_out at (20000,5200) wall shell width 1000 swing outward
door id=d_wc1 on w_core at 1800 width 900 swing into r_wc1
door id=d_wc2 on w_core at 3200 width 900 swing into r_wc2
door id=d_terrace glazed_sliding at (2200,15000) wall shell width 2400
window fixed at (4200,15000) wall shell width 1000
# ---- windows ----
window casement at (3200,0) wall shell width 1800
window fixed at (6700,0) wall shell width 2400
window fixed at (12300,0) wall shell width 2400
window casement at (17000,0) wall shell width 2400
window fixed at (0,2500) wall shell width 1500 sill 300
window fixed at (0,6500) wall shell width 1500 sill 300
window sliding at (0,12250) wall shell width 1800
window fixed at (6800,15000) wall shell width 1800 sill 300
window fixed at (12200,15000) wall shell width 1800 sill 300
window casement at (20000,2500) wall shell width 1800
window tilt at (20000,7750) wall shell width 600 sill 1500
window tilt at (20000,10250) wall shell width 600 sill 1500
window fixed at (20000,13400) wall shell width 1200
# ---- dimensions: overall length and depth, and a chain on the south (entrance) front ----
dim (20150,-150)->(-150,-150) offset 900
dim (-150,-150)->(-150,15150) offset 900
let SOUTH = [-150, 1000, 3400, 3700, 4700, 5900, 7700, 8500, 10500, 11300, 13100, 20150]
for i in 0..11 {
dim (SOUTH[i],15150)->(SOUTH[i + 1],15150) offset 600
}
# ---- reading room: four reading tables either side of the central aisle ----
let TX = [6900, 10100]
let TY = [4500, 7700]
for i in 0..2 {
for j in 0..2 {
furniture table at (TX[i], TY[j]) size 2000x900 label "Reading table" in r_read
furniture chair at (TX[i] + 250, TY[j] - 550) size 500x500 in r_read
furniture chair at (TX[i] + 1250, TY[j] - 550) size 500x500 in r_read
furniture chair at (TX[i] + 250, TY[j] + 950) size 500x500 rotate 180 in r_read
furniture chair at (TX[i] + 1250, TY[j] + 950) size 500x500 rotate 180 in r_read
}
}
furniture bookshelf at (13350,5600) size 400x1800 in r_read
furniture bookshelf at (5250,5600) size 400x1800 in r_read
# ---- study carrels on the north light ----
let KX = [5200, 6300, 7400, 10600, 11700, 12800]
for i in 0..6 {
furniture desk at (KX[i], 200) size 1000x600 in r_carrels
furniture office_chair at (KX[i] + 250, 900) size 500x500 rotate 180 in r_carrels
}
# ---- entrance and lending hall ----
furniture id=f_lend reception_desk at (11400,13000) size 2400x800 rotate 180 label "Lending" in r_hall
furniture plant at (13400,14350) size 500x500 in r_hall
furniture office_chair at (12350,14000) size 500x500 facing f_lend in r_hall
# ---- children's library ----
furniture bookshelf against r_child.right offset 2500 size 3600x400 in r_child
furniture bookshelf against r_child.bottom offset 2000 size 2400x400 in r_child
furniture bookshelf against r_child.top offset 1000 size 1400x400 in r_child
furniture bean_bag at (600,4800) size 800x800 in r_child
furniture bean_bag at (1700,4800) size 800x800 in r_child
furniture sofa at (500,7800) size 1800x800 in r_child
furniture armchair at (2700,7800) size 800x800 in r_child
furniture id=t_kids table at (1400,1600) size 1600x900 in r_child
furniture chair at (1550,1100) size 450x450 facing t_kids in r_child
furniture chair at (2350,1100) size 450x450 facing t_kids in r_child
furniture chair at (1550,2550) size 450x450 facing t_kids in r_child
furniture chair at (2350,2550) size 450x450 facing t_kids in r_child
furniture bean_bag at (2800,4800) size 800x800 in r_child
# ---- cafe corner ----
furniture counter against r_cafe.top offset 800 size 1200x600 in r_cafe
furniture kitchen_sink against r_cafe.top offset 2000 size 1200x600 in r_cafe
furniture fridge against r_cafe.top offset 3100 size 700x700 in r_cafe
furniture id=t_cafe1 table at (900,11800) size 800x800 in r_cafe
furniture chair at (1050,11250) size 500x500 facing t_cafe1 in r_cafe
furniture chair at (1050,12650) size 500x500 facing t_cafe1 in r_cafe
furniture id=t_cafe2 table at (3200,11800) size 800x800 in r_cafe
furniture chair at (3350,11250) size 500x500 facing t_cafe2 in r_cafe
furniture chair at (3350,12650) size 500x500 facing t_cafe2 in r_cafe
furniture plant at (4300,14300) size 500x500 in r_cafe
# ---- staff work room ----
furniture id=s1 desk at (14700,300) size 1600x800 in r_staff
furniture office_chair at (15250,1200) size 500x500 facing s1 in r_staff
furniture id=s2 desk at (17900,300) size 1600x800 in r_staff
furniture office_chair at (18450,1200) size 500x500 facing s2 in r_staff
furniture printer against r_staff.right offset 4300 in r_staff
furniture bookshelf against r_staff.bottom offset 4500 size 1800x400 in r_staff
furniture id=t_staff table at (15000,3000) size 1800x900 in r_staff
furniture chair at (15250,2450) size 500x500 facing t_staff in r_staff
furniture chair at (16050,2450) size 500x500 facing t_staff in r_staff
furniture chair at (15250,3950) size 500x500 facing t_staff in r_staff
furniture chair at (16050,3950) size 500x500 facing t_staff in r_staff
# ---- WCs ----
furniture wc against r_wc1.right offset 550 size 400x700 in r_wc1
furniture basin against r_wc1.top offset 1000 size 600x450 in r_wc1
furniture wc against r_wc2.right offset 1950 size 400x700 in r_wc2
furniture basin against r_wc2.bottom offset 1000 size 600x450 in r_wc2
# ---- the ground: a tight frame round the building ----
outdoor lawn at (-3300,-3500) size 26600x3500
outdoor lawn at (-3300,0) size 3300x15000
outdoor lawn at (20000,0) size 3300x15000
outdoor id=g_terrace deck at (-3300,15000) size 8300x3500 label "Cafe terrace"
outdoor id=g_forecourt paving at (5000,15000) size 9000x3500 label "Forecourt"
outdoor planting at (14000,15000) size 9300x3500
furniture tree at (-2900,-3100) size 2500x2500
furniture tree at (20400,-3100) size 2500x2500
furniture bike_rack at (15000,16700) size 3000x800
}
# =====================================================================================
# UPPER FLOOR
# =====================================================================================
level 2 "Upper floor" height 3500 {
wall id=shell exterior thickness 300 material brick { (0,0) (20000,0) (20000,15000) (0,15000) close }
wall id=w_west partition thickness 100 { (5000,0) (5000,15000) }
wall id=w_east partition thickness 100 { (14000,0) (14000,15000) }
wall id=w_g1 partition thickness 100 { (0,5000) (5000,5000) }
wall id=w_g2 partition thickness 100 { (0,9500) (5000,9500) }
wall id=w_staff partition thickness 200 material concrete { (14000,6500) (20000,6500) }
wall id=w_core partition thickness 200 material concrete { (17500,6500) (17500,11500) (20000,11500) }
wall id=w_wc partition thickness 100 material tile { (17500,9000) (20000,9000) }
wall id=w_drum partition thickness 300 material concrete {
(14000,6500)
arc (12200,2900) radius 4500
arc (9500,2000) radius 4500
arc (6800,2900) radius 4500
arc (5000,6500) radius 4500
arc (6800,10100) radius 4500
arc (9500,11000) radius 4500
arc (12200,10100) radius 4500
arc (14000,6500) radius 4500
}
zone public "Public" {
room id=r_gallery circle at (9500,6500) radius 4500 label "Gallery" at (9500,2850) uses circulation floor timber
room id=r_quiet polygon (5000,0) (14000,0) (14000,6500) arc (9500,2000) radius 4500 arc (5000,6500) radius 4500
label "Quiet study" at (9500,1000) uses office floor carpeting
room id=r_upper polygon (5000,6500) arc (9500,11000) radius 4500 arc (14000,6500) radius 4500 (14000,15000) (5000,15000)
label "Reading lounge" at (8000,12700) uses living floor timber
room id=r_study1 at (0,0) size 5000x5000 label "Study room 1" uses office floor carpeting
room id=r_group2 at (0,5000) size 5000x4500 label "Group room 2" uses office floor carpeting
room id=r_group1 at (0,9500) size 5000x5500 label "Group room 1" uses office floor carpeting
room id=r_study2 at (14000,0) size 6000x6500 label "Study room 2" uses office floor carpeting
}
zone core "Core and services" {
room id=r_core polygon (14000,6500) (17500,6500) (17500,11500) (20000,11500) (20000,15000) (14000,15000)
label "Stair hall" at (15200,10500) uses circulation floor concrete
room id=r_wc3 at (17500,6500) size 2500x2500 label "Accessible WC" uses wc floor tile
room id=r_wc4 at (17500,9000) size 2500x2500 label "Accessible WC" uses wc floor tile
}
# The void over the reading room: a square well, 4.3 m a side, so the gallery round it is
# 2.2 m wide at the middle of each side and 1.3 m at the corners. (The language takes only
# rectilinear voids; a stepped or cross-shaped one inside a circular room is mis-cut by the
# 3D extruder, see the report, so the well is a plain square.)
void id=v_read at (7350,4350) size 4300x4300 rail all
stair id=st dir down width 1400 {
flight at (15950,13450) size 2500x1400
landing at (18450,11950) size 1400x2900
flight at (15950,11950) size 2500x1400
}
void id=v_stair polygon (15950,11950) (19850,11950) (19850,14850) (15950,14850) (15950,13350) rail 0 3
elevator id=lift at (14200,6650) size 1800x2000
door id=d_gal double on w_drum at 75% width 1800 swing into r_gallery
opening id=o_quiet on w_drum at 25% width 1500
door id=d_study1 on w_west at 2500 width 900 swing into r_study1
door id=d_group2 on w_west at 8700 width 900 swing into r_group2
door id=d_group1 on w_west at 11000 width 900 swing into r_group1
opening id=o_core on w_east at 11000 width 3000
door id=d_study2 on w_staff at 2750 width 900 swing into r_study2
door id=d_wc3 on w_core at 1800 width 900 swing into r_wc3
door id=d_wc4 on w_core at 3200 width 900 swing into r_wc4
window casement at (3200,0) wall shell width 1800
window fixed at (6700,0) wall shell width 2400
window fixed at (12300,0) wall shell width 2400
window casement at (17000,0) wall shell width 2400
window casement at (0,2500) wall shell width 1500
window casement at (0,7250) wall shell width 1500
window casement at (0,12250) wall shell width 1800
window fixed at (2500,15000) wall shell width 1800
window fixed at (9500,15000) wall shell width 4000 sill 300
window casement at (20000,2500) wall shell width 1800
window tilt at (20000,7750) wall shell width 600 sill 1500
window tilt at (20000,10250) wall shell width 600 sill 1500
window fixed at (20000,13400) wall shell width 1200
dim (20150,-150)->(-150,-150) offset 900
dim (-150,-150)->(-150,15150) offset 900
# ---- quiet study: carrels on the north light ----
let KX = [5200, 6300, 7400, 10600, 11700, 12800]
for i in 0..6 {
furniture desk at (KX[i], 200) size 1000x600 in r_quiet
furniture office_chair at (KX[i] + 250, 900) size 500x500 rotate 180 in r_quiet
}
# ---- reading lounge ----
furniture armchair at (5300,12500) size 800x800 in r_upper
furniture armchair at (5300,13700) size 800x800 in r_upper
furniture sofa at (11500,13900) size 2000x850 in r_upper
furniture side_table at (5500,13300) size 400x400 in r_upper
furniture plant at (13300,13200) size 500x500 in r_upper
# ---- study rooms ----
furniture id=sd1 desk against r_study1.top offset 2500 size 1400x700 in r_study1
furniture office_chair at (2250,1050) size 500x500 facing sd1 in r_study1
furniture id=sd2 desk against r_study1.left offset 3200 size 1400x700 in r_study1
furniture office_chair at (1050,2950) size 500x500 facing sd2 in r_study1
furniture bookshelf against r_study1.bottom offset 2500 size 2000x400 in r_study1
furniture id=sd3 desk at (14500,300) size 1400x700 in r_study2
furniture office_chair at (14950,1150) size 500x500 facing sd3 in r_study2
furniture id=sd4 desk at (16600,300) size 1400x700 in r_study2
furniture office_chair at (17050,1150) size 500x500 facing sd4 in r_study2
furniture id=t_s2 table at (15500,3000) size 1800x900 in r_study2
furniture chair at (15750,2450) size 500x500 facing t_s2 in r_study2
furniture chair at (16550,2450) size 500x500 facing t_s2 in r_study2
furniture chair at (15750,4050) size 500x500 facing t_s2 in r_study2
furniture chair at (16550,4050) size 500x500 facing t_s2 in r_study2
furniture bookshelf against r_study2.right offset 4300 size 1800x400 in r_study2
# ---- group rooms ----
furniture id=t_g2 table at (1300,6650) size 2000x1000 in r_group2
furniture chair at (1550,6100) size 500x500 facing t_g2 in r_group2
furniture chair at (2550,6100) size 500x500 facing t_g2 in r_group2
furniture chair at (1550,7800) size 500x500 facing t_g2 in r_group2
furniture chair at (2550,7800) size 500x500 facing t_g2 in r_group2
furniture chair at (3450,6750) size 500x500 facing t_g2 in r_group2
furniture whiteboard against r_group2.top offset 2300 in r_group2
furniture id=t_g1 table at (1300,11700) size 2000x1000 in r_group1
furniture chair at (1550,11150) size 500x500 facing t_g1 in r_group1
furniture chair at (2550,11150) size 500x500 facing t_g1 in r_group1
furniture chair at (1550,12850) size 500x500 facing t_g1 in r_group1
furniture chair at (2550,12850) size 500x500 facing t_g1 in r_group1
furniture chair at (3450,11800) size 500x500 facing t_g1 in r_group1
furniture whiteboard against r_group1.top offset 2300 in r_group1
furniture printer against r_group1.bottom offset 4300 in r_group1
furniture wc against r_wc3.right offset 550 size 400x700 in r_wc3
furniture basin against r_wc3.top offset 1000 size 600x450 in r_wc3
furniture wc against r_wc4.right offset 1950 size 400x700 in r_wc4
furniture basin against r_wc4.bottom offset 1000 size 600x450 in r_wc4
roof overhang 600 wall shell
}
title {
project "Library Pavilion"
drawn_by "ArchLang"
date "2026-12-03"
number "SR-09"
revision "A"
}
}
More in Public buildings
- Studio Office: An architecture practice of about 300 m² on a column grid: reception, meeting room, model shop and an open studio on the south light.
- Corner Café & Bakery: A street-corner café with an artisan bakery on show behind the service bar, a pavement terrace and a delivery yard.
- Health Centre: A community health centre on one wide corridor: reception and waiting at the public end and eight identical consulting rooms.
- Museum (A1 sheet): A 100 x 60 m museum issued on a real A1 sheet at 1:200, because at that size a web-scaled drawing stops working.
- Aquarium (curves): A public aquarium built around a cylindrical tank — the curved-geometry example: arc walls and a circular room.
- Library (legend): A public library around a circular reading room, issued on a sheet with a room schedule and a fixture legend.
- Transit Hall: A 90 x 40 m metro concourse split by its gate line: one 300 mm partition with nine openings punched by a loop.
- Clinic (place ×6): An outpatient wing whose six consulting rooms are one component placed six times, rather than six copies.
- Practice Office (workplace): A 225 m² office on a spine corridor: open workspace, meeting rooms, break room and an accessible WC, issued with tagged openings.
- Corner Cafe (front and back): A 15 x 10 m cafe split into front and back of house: a dining room for eighteen, a servery, a kitchen and a store.
- Classroom Block (school): A single-storey school block: three 60 m² classrooms on a 2 m corridor, with lobby, staff prep, pupil WCs and an accessible WC.