Kolakoski Kurve
Try it online @ catseye.tc | See also: Maze Clouds ∘ Latcarf ∘ Erratic Turtle Graphics
The Kolakoski sequence (Wikipedia), also called the "see and say" sequence, is an unbounded sequence of 1's and 2's which starts
1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, ...
An interesting property of this sequence is that is describes its own run lengths: there is one 1's, followed by two 2's, followed by two 1's, followed by one 2, and so forth.
Kolakoski Kurve is a 2-dimensional visualization of the Kolakoski sequence that I devised circa 2016. It can be thought of as combining the sequence with turtle graphics, by the following method: Read the sequence left to right; whenever you see a 1, go forward some fixed distance, and whenever you see a 2, turn right 90 degrees.
Because the sequence itself is irregular, this process produces irregular shapes which are, to my mind, aesthetically pleasing.
The path does fold back on itself quite often (whenever two 2's appear in the sequence), so drawing the path with an XOR pen (which inverts any existing pixels on the line) instead of simply laying down black pixels results in another interesting drawing.
Commit History
@master
git clone https://git.catseye.tc/Kolakoski-Kurve/
- Update links in "see-also bar". Chris Pressey 1 year, 27 days ago
- Add LICENSE, see-also link to Erratic Turtle Graphics. Chris Pressey 2 years ago
- Add second screenshot, a little more description. Chris Pressey 2 years ago
- Some updates to the README. Chris Pressey 2 years ago
- Initialize properly and otherwise clean up gewgaw implementation. Chris Pressey 2 years ago
- Complete the presentation in the launcher script. Chris Pressey 2 years ago
- Initial import of files for Kolakoski Kurve gewgaw. Incomplete. Chris Pressey 2 years ago