Maze Clouds
Try it online @ catseye.tc | See also: Latcarf ∘ Erratic Turtle Graphics ∘ Kolakoski Kurve
This is a gewgaw I came up with in September 2017. You could call it a generative art technique, or you might feel that makes it sound more important than it is, so you could call it a gewgaw.
At the time I implemented as a Python program that writes out an SVG file. In 2019 I implemented a Javascript version that builds a SVG element in a web page. Both implementations are in this distribution.
To view the Javascript version, you can clone this repository and open demo/maze-clouds.html locally in a web browser, or you can just go view the online installation at catseye.tc.
The logic for generating the maze is in the Javascript source src/maze-clouds.js while the code for applying the visuals to it is in demo/maze-clouds-svg-launcher.js. (Normally, seperating content from presentation is a good thing, although it may be a little overkill in a case like this. One upshot is that it's not strongly tied to SVG; one could easily re-implement it for HTML5 canvas, etc.)
The "cumulus" and "stormy" visuals were part of the original Python version; the others were added in the Javascript version.
The maze-generating logic was originally written as a simple recursive function, but, since Python does no tail-call optimization, even a modest grid size would lead to exceeding the maximum recursion depth. It was thus re-written in an iterative manner (i.e. as a while loop operating on an explicit stack.) The recursive version remains in the Python version for comparison, but only the iterative version was converted to Javascript.
Commit History
@master
git clone https://git.catseye.tc/Maze-Clouds/
- Update links in "see-also bar". Chris Pressey 1 year, 1 month ago
- Add link to Kolakoski Kurve in see-also bar. Chris Pressey (commit: GitHub) 2 years ago
- Better links. Chris Pressey 4 years ago
- See-also other similar gewgaws. Chris Pressey 4 years ago
- Link to the online installation. Chris Pressey 5 years ago
- Have HTML5 demo use dam-plus-widgets-web.js from DAM 0.1. Chris Pressey 5 years ago
- 'Stormy' is initially selected. Chris Pressey 5 years ago
- Re-arrange the control panel. Chris Pressey 5 years ago
- Use DAM to make the UI. Chris Pressey 5 years ago
- Put controls in a dedicated control panel element (a div). Chris Pressey 5 years ago