Files

41 lines
3.9 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from pathlib import Path
from html import escape
O=Path(__file__).parent
p=['<svg xmlns="http://www.w3.org/2000/svg" width="1400" height="1080" viewBox="0 0 1400 1080"><rect width="1400" height="1080" fill="#f1eee5"/><style>text{font-family:Arial,sans-serif;fill:#263a34}.small{font-size:13px}.body{font-size:16px}.title{font-size:32px;font-weight:600}.label{font-size:13px;font-weight:600}</style><text x="60" y="60" class="title">One family. Room to become yourself.</text><text x="60" y="94" class="body">SAMFORD VALLEY / Shared kitchen + dining, adjacent parents’ room, three future children’s rooms</text>']
def pt(x,y):return (690+17*x,520-17*y)
def label(x,y,lines,size=13):
X,Y=pt(x,y)
for i,t in enumerate(lines):p.append(f'<text x="{X}" y="{Y+i*(size+3)}" text-anchor="middle" font-size="{size}">{escape(t)}</text>')
def rect(cx,cy,w,d,fill,stroke='#4b6256',dash=''):
X,Y=pt(cx-w/2,cy+d/2);p.append(f'<rect x="{X}" y="{Y}" width="{w*17}" height="{d*17}" rx="2" fill="{fill}" stroke="{stroke}" stroke-width="2" {dash}/>')
def line(points,color='#a99372',width=16):
ps=' '.join(f'{pt(x,y)[0]},{pt(x,y)[1]}' for x,y in points);p.append(f'<polyline points="{ps}" fill="none" stroke="{color}" stroke-width="{width}" stroke-linejoin="round"/>')
# Covered walks first, with clear building footprints drawn over them.
line([(-3,5.4),(-3,14.6)],width=20);line([(-11,9), (7,9),(7,12.6)],width=20)
rect(0,0,12,6,'#ddc8a9');label(0,.8,['CENTRAL ROOM','Kitchen · dining · lounge','Local AI desk'],13)
rect(0,4.2,12,2.4,'#c8d0b8');label(0,4.3,['NORTH VERANDA'],12)
rect(-7.75,-1.8,3.5,1.2,'#c7bfae');label(-7.9,1.0,['Short corridor','3.5 × 1.2 m'],12)
rect(-11.8,-4.9,8,5,'#ddc8a9');rect(-12.7,-4.9,6.2,5,'#ddc8a9');label(-12.7,-4.5,['PARENTS’','BEDROOM'],12)
rect(-8.7,-5.63,1.8,3.54,'#b6c4c5');label(-8.7,-5.25,['Bath'],10);label(-8.7,-3.0,['Lobby'],9)
for i,(x,y,color) in enumerate([(-11,12,'#d8b4a0'),(-3,17,'#b9c9b8'),(7,15,'#aec4d0')]):
rect(x,y,4.5,4.8,color,dash='stroke-dasharray="6 3"');label(x,y+.6,[f'CHILD {i+1}','Own room','4.5 × 4.8 m'],11)
label(-1,11.6,['SHARED','COURTYARD'],12)
X,Y=pt(-23,2);p.append(f'<ellipse cx="{X}" cy="{Y}" rx="38" ry="32" fill="#c5a378" stroke="#4b6256" stroke-width="2"/>');label(-23,2.1,['SAUNA'],12)
rect(-27,4.6,1.3,1.3,'#b6c4c5');label(-27,7,['Outdoor','shower'],12)
for x in [-23.95,-26.25]:
X,Y=pt(x,-8);p.append(f'<circle cx="{X}" cy="{Y}" r="17" fill="#6b7f61"/>')
label(-25,-10,['Rainwater tanks'],12)
rect(24.2,-7.5,4.3,5,'#c3d6c1');label(24.2,-7,['GREENHOUSE'],11)
for x in [23.8,27.5]:
for y in [-1.7,1.5,4.7]:rect(x,y,2.3,1.3,'#b29b73')
label(25.5,7,['FOOD GARDEN'],13)
rect(13.2,-17.7,7.3,5.2,'#71848b');label(13.2,-17,['GROUND SOLAR'],12)
label(0,-7.5,['Roof solar on main pavilion','Starlink on parents’ wing'],12)
line([(0,7),(9,9),(19,9),(26,6)],color='#d2ccb9',width=7)
line([(-3,5.4),(-15,6),(-22,6.6),(-25,5.9)],color='#d2ccb9',width=7)
# Diagram furniture indicates that children personalise the same simple base room.
for x,y in [(-11,12),(-3,17),(7,15)]:
rect(x-1.4,y-.7,.7,1.5,'#f3eadb',stroke='#879387')
p.extend(['<path d="M1260 215V148m0 0l-9 18m9-18l9 18" fill="none" stroke="#263a34" stroke-width="3"/><text x="1260" y="135" text-anchor="middle" class="body">N</text>','<line x1="75" y1="890" x2="245" y2="890" stroke="#263a34" stroke-width="4"/><text x="75" y="920" class="small">10 metres</text>','<line x1="60" y1="960" x2="1340" y2="960" stroke="#bdc3b6"/><text x="60" y="992" class="body">Dashed cabins = future rooms for the three children. Shared kitchen, dining and bathroom stay in the family home.</text>','<text x="60" y="1020" class="small">Illustrative layout, not a surveyed block or construction drawing. No property boundary or approval is implied.</text>','<text x="60" y="1044" class="small">Land search guide: 1–2 hectares of usable land; around 2 hectares offers more flexibility. Site conditions decide suitability.</text></svg>'])
(O/'family-courtyard-plan.svg').write_text(''.join(p))