Genetic Art
Helix Codex — genetic art that stores text, read back by a phone
Seven genetic works on A4 paper where the line is a double helix and every rung is one of four colours, two bits each. A Rust engine turns a text into a deterministic geometry with Reed-Solomon error correction; the same decoder, compiled to WebAssembly, runs as an offline phone app that photographs a print and returns the text letter for letter. The works, prints and commissions live at art.theodorosdimitriou.com.
Rust WebAssembly Reed-Solomon Tauri 2 SVG Astro 5 React 19 React Three Fiber three.js PWA Node.js nginx
Key Features
- Payload pipeline: Unicode NFC → deflate → header with length and CRC32 → Reed-Solomon over GF(256) with interleaving, because damage on paper comes in clusters (High level: 64 parity bytes per 255-byte block, ~33 % overhead)
- 2 bits per rung (four saturated colours) on two strands, with black as a control channel: orientation patterns and a clock rung every 64
- A 20-byte geometry "recipe" printed twice in the margins (template, parameters and seed, CRC16), so the decoder rebuilds the exact line and only samples colours at known coordinates
- 25 parametric templates (wave, logarithmic spiral, braided river, golden-angle phyllotaxis, labyrinth and more) plus photo-based portraits that carry data in helix border rings; deterministic RNG and noise, frozen by golden-vector tests
- Offline reader: the Rust decoder compiled to a ~277 KB WebAssembly module with a plain C ABI and a vanilla-JS PWA; corner detection, homography, colour calibration from a printed legend, then RS decoding; photos never leave the phone
- Tauri 2 desktop editor that renders print-ready SVG and re-reads any saved sheet through the same decoder
- Gallery site in Astro 5 (English and Greek) with a React Three Fiber walk-through hall, a deep-zoom viewer per work, and a dependency-free Node forms service for print orders, commissions and a double-opt-in newsletter
Challenges Overcome
- Making colour survive real cameras: a colour-zone rule enforced in code keeps decoration desaturated so it can never be mistaken for data, and a printed legend recalibrates every phone
- Turning a hand-held, angled photo back into millimetre coordinates: auto-detected fiducials, tap-to-snap refinement from ~3 mm to ~0.05 mm, and a homography
- Keeping art and data in one line: the geometry has to look right from a metre away and still be decodable at 0.4 mm
- Designing for longevity: no server, no account, no network — a format meant to outlive its own website
Results & Impact
Seven works live at art.theodorosdimitriou.com, carrying Cavafy, Heraclitus, Sappho, Apollodorus, a folk song and my own text: 295 hidden words, 2.7 KB on paper
Archival pigment prints in editions of 25 (A4 €120, A3 €190, A2 €320); every print is read back with the reader before it ships
83 Rust tests (round-trips, simulated camera damage, auto-corners, golden geometry) plus 34 tests for the forms service
About 8,600 lines of Rust and 9,500 lines for the gallery site; capacity up to 5.1 KB, roughly 1,600 Greek words, on a single A4 sheet