Portfolio / Computational Design

NKS Lines in 3D

The same idea as NKS Line Drawings, let off the page. An elementary cellular automaton evolves, and a turtle walks its cells as one unbroken line — but now in three dimensions. Each cell still yaws the heading left (0) or right (1), exactly as before, so the rule means the same thing; what's new is a steady roll applied on every step, twisting the heading's frame so the flat drawing winds up off the plane into a coil. Set the roll to zero and you get precisely the 2D line; turn it up and the automaton's evolution becomes a wandering wire in space — kin to the 3D line sculptures I built from these systems in 2004.

Build the rule with the slider, the arrow rule-table (each case maps three yaws to one — click to flip), the famous-rule presets, or shuffle; set the turning angle, the roll, the row length, and the speed; start from a single seed or a random row. It draws continuously until you pause — play/pause, or step a generation at a time. Drag to orbit, scroll to zoom, shift-drag to pan, double-click to reset; leave spin on to let it turn while it grows — or flip on ride along the line to drop into the line itself and fly the camera down the path, banking smoothly through every turn and roll. Plain HTML5 canvas + JS, no libraries, light or dark to match the page. Source on GitHub.