Variables and expressions¶
Assign a value to a name and reuse it. Numeric values can drive dimensions through expressions:
Because the width is computed, changing the variable changes every shape that depends on it — one edit, many effects. Expressions support the usual arithmetic, so you can express relationships between sizes rather than hand-tuning each number:
Shared size variable
base = 8
A: box "narrow" width base * 6
B: box "wide" width base * 12 at (0, 120)
Next: combine everything into a real diagram in Putting it all together.