From one number to one knot
The only input is the clock of the Base chain: the timestamp of the current block. Nobody sets it and nobody can roll it back.
A day is that timestamp divided by 86,400, rounded down. That gives one calendar day in UTC, with the boundary at midnight UTC. The number itself counts days since 1 January 1970; day one of this project is day number 20701.
The seed is that day number run through splitmix64. From it you pull a stream of bits. The first draws set ten traits; the rest fill the grid, one cell at a time.
The traits: a palette out of sixteen; a grid of 6, 8, 10 or 12 cells a side; a weave, which is the set of shapes a cell can take; a symmetry, which is none, a mirror, a fourfold medallion or a quarter turn; a weight for the cord; round or cut ends; one day in sixteen, an accent color on a few cells; a style, which draws the cord as one line, a split line, dashes, or drops it for filled Truchet triangles; a ground under the knot, flat, dots or a lattice; and, one day in four, the palette inverted.
Six cell states: two quarter-arcs in one of two orientations, a vertical pass, a horizontal pass, an empty cell (weave "loose") and a crossing (weave "cross"). Classic Truchet has arcs and nothing else. The passes break it into longer runs.
The drawing is one SVG path drawn twice: a thicker shadow and a thinner cord, plus a third path in the accent color when the day has one. Style solid replaces the strokes with one filled path. The whole file is a few kilobytes. The contract returns it as a data: URI, with no server in between.
The palette is one of sixteen. This page takes its colors from today's palette, so it looks different in each epoch. Today: ultramarine. See all traits and how often they come up.
Day 1 came out of the first version of the machine: eight palettes, always 8 by 8, arcs and passes, no symmetry. Each token remembers the machine that drew it, so a claimed day never changes, even when the machine does. Every day from day 2 follows the rules on this page.
Build it yourself
The same day number gives the same knot every time, ten years from now and with this page switched off. The generator is in the repository, in TypeScript and in Solidity, with a test that keeps the two byte for byte equal. The random stream is below; the trait tables are in spec.json.
u64 next(u64 x):
x += 0x9e3779b97f4a7c15
x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9
x = (x ^ (x >> 27)) * 0x94d049bb133111eb
return x ^ (x >> 31)
counter = next(day_number)
palette = top8(next(++counter)) mod 16
grid = GRIDS[top4(next(++counter))]
weave = WEAVES[top3(next(++counter))]
symmetry = SYMMETRIES[top3(next(++counter))]
weight = WEIGHTS[top2(next(++counter))]
caps = top2(next(++counter)) == 0 ? butt : round
accent = top4(next(++counter)) == 0 ? ACCENTS[top2(next(++counter))] : none
style = STYLES[top3(next(++counter))]
ground = GROUNDS[top3(next(++counter))]
inverted = top2(next(++counter)) == 0
for each free cell in row order:
state = stateOf(weave, top3(next(++counter)))
if accent and state is not empty: mark = top4(next(++counter)) == 0
mirrored cells copy their source, arcs flip under a mirror or a quarter turn
Everything here is CC0. If you build it, write to me. That is the one thing I am waiting for here.