Reactivity means that derived variables automatically recompute whenever their dependencies change. Define a scalar t, build angles and sizes from it, and every update to t propagates through the entire dependency chain instantly - no manual refresh needed.
The setup below builds a square whose size and rotation are both driven by a single parameter t:
t = \scalar 0t-plus-1 = \add t 1angle = \mul t 90side = \mul 2 t-plus-1\square p0 side angleNow change t and watch everything update:
t-plus-1, angle, side, and the square all recompute immediately. The entire chain is driven by a single value.
Because everything depends on t, animating t animates the whole structure. The animation-speed variable controls how fast t changes each frame:
t = \scalar 0animation-speed = \scalar 0.001\animate t 1\animate t 0The square grows and rotates smoothly as t sweeps between 0 and 1 - driven entirely by two lines of derivation.
\copy: a non-reactive snapshot\copy produces a static copy of an object's current state. The copy is detached from the reactive graph - upstream changes no longer reach it.
\copy poly0The live square redraws; the copy does not move.
This pattern can be repeated to build up a sequence of snapshots at different values of t:
The canvas now shows five static snapshots alongside the live square. None of the copies responded to any change in t.
\translate and \rotate also break reactivityTransforming a reactive object with \translate or \rotate also cuts its reactive connection. The result is a new static object.
\translate
Start fresh, draw a line, and compute its midpoint:
\line a bm = \mid-point line0At this point m is reactive - move a and m follows:
a = \point 0 0Now translate m:
\translate m 1 0a = \point -2 0After \translate, m is a fixed point. Its dependency on a (through line0) is gone.
\rotate
\rotate m p0 90a = \point -3 0The outcome is the same: \rotate produces a new static result, detached from the reactive chain.
The rule is consistent: reactive objects stay reactive until a structural operation (\copy, \translate, \rotate) creates a new static result. Everything upstream continues to update normally - only the transformed or copied result is frozen.