Math
L-systems
A grammar of a few rules, grown into a plant: rewrite, walk, rewrite deeper.

What happens
Lindenmayer wrote plants as strings: an axiom, a few rules that replace each symbol, and a turtle that reads the result - F draws a step, + and − turn, & and ^ pitch, brackets remember where a branch began. Rewrite once and you have a sprig; rewrite five times and a bush. Here the turtle's stroke is revealed in order, so the plant grows from trunk to leaves, the Hilbert curve threads its cube stroke by stroke, the dragon unfolds - and when the stroke is done, the string is rewritten once more and it grows again. The counts are what the grammar produced: the Koch curve has 4^n segments and length (4/3)^n, the dragon 2^n and never repeats one, the 3D Hilbert curve exactly 8^n − 1 through every point of a 2^n cube. Nothing is drawn that the string did not say.
Equations used in the module
Equations rewrite: every symbol becomes its rule, n times (F → F+F−−F+F gives 4^n segments) turtle: F draws a unit forward, + − yaw, & ^ pitch, \ / roll, [ ] push and pop the state Koch: length (4/3)^n, dimension log 4 / log 3 = 1.2619 Hilbert 3D: one stroke of 8^n − 1 segments through all 8^n points of a 2^n cube plant F → F[+F]F[−F][F]: 5^n segments; the bracket count is always balanced


