Take Fibonacci modulo 131, turn by each term, step forward — and the walk closes.
Numbers as instructions
A turtle reads a sequence of integers. Each one is a turn; after each turn it steps
forward a fixed distance. That is the whole drawing — there is no geometry in the input
at all, only arithmetic.
var numbers = Pisano(Mod, seriesGenerators[Sequence]());
The sequence is an integer series taken modulo a number. For the Fibonacci series
that gives a Pisano sequence, named for Leonardo of Pisa.
A tenth of the terms.
The Pisano period
Fibonacci modulo m is periodic, and it repeats from the very beginning rather than
after a run-in — the period is called π(m). For m = 131 it is 130; for m = 151
it is only 50. The five renderings therefore repeat at very different rates while running
for hundreds of terms.
That matters for the drawing. Once the sequence repeats, the turtle repeats the same
turns in the same order — so the path either closes into a loop or drifts by a fixed
offset and repeats forever, depending on whether the total turning over one period is a
whole number of revolutions.
Every closed figure in this piece is that arithmetic fact made visible.
A quarter of the terms. The path is still exploring; nothing has repeated.
Half. Structure has appeared, and it did not come from the geometry — the only inputs
are a modulus, a step length and a series.
Three quarters. Depending on the modulus the sequence may have repeated several times
already: at a period of 130 and a budget of 773 terms, the lead rendering walks the same
130 turns just under six times.
All of them. Whether the figure closes or drifts depends on the total turning over one
period: a whole number of revolutions closes it, anything else advances it by a fixed
offset and repeats forever.
Five series, one walk
() => Fibonacci(0, 1),
() => Fibonacci(2, 1),
Triangular,
() => Multiples(4),
() => Recaman(600, 700)
The generator is selected by Sequence, so the same turtle draws Fibonacci, Lucas
numbers, triangular numbers, multiples of four, or Recamán’s sequence — the last being
the one that is not eventually periodic in any obvious way and produces the least
closed figures.
All of them are computed in BigInteger, then reduced. That is not caution: Fibonacci
numbers pass the range of a 64-bit integer at term 93, and the walk runs for hundreds of
terms.
Five renderings
| Rendering | Sequence | Modulus | Angle | Terms | Step |
|---|
| Cyber Cyan | Fibonacci | 131 | 60° | 773 | 5 |
| Ember Grid | Fibonacci | 89 | 90° | 800 | 5 |
| Dusk Rose | Lucas | 131 | 60° | 773 | 5 |
| Solar Gold | Fibonacci | 151 | 60° | 773 | 4 |
| Frost Delta | Fibonacci | 109 | 120° | 900 | 4 |
The modulus sets the turn granularity and the period length; changing it by one gives a
completely different figure. The turn angle changes the geometry of the walk: at 90° only
right-angle turns are possible, producing a rectilinear walk; at 120° the walk folds
through equilateral angles. Ember Grid and Frost Delta explore these alternatives. Dusk
Rose uses the Lucas sequence — starting from 2, 1 rather than 0, 1 — which produces a
different residue distribution over the same modulus as Cyber Cyan. Solar Gold’s period
of fifty is short enough that the same 50-turn figure repeats fifteen times over. The net
turning per period is not a whole revolution, so each repetition shifts the walk by a
fixed offset — the figures chain rather than close.
Gallery presentation
The Museum Frame variant presents Cyber Cyan the way a gallery would: on a dark
wall, behind a warm off-white mat, inside a slim near-black frame with a soft
drop shadow. The framing is the upstream MuseumFrame from SkiaSharp.Extensions,
applied as a presentation layer on top of the generated walk; the path itself is
identical to Cyber Cyan. Any variant could be framed this way, but keeping it to
one preserves the distinction between walk variants and display mode.
Determinism
Nothing is seeded and nothing is random. The sequences are exact BigInteger recurrences
and the walk is a running sum of headings.