Altliteral grammar: literalalts.g
Passage state grammar: passages.g
This is simply a re-engineering in Processing and a recasting in 'grammatical' terms of processes underlying a previous piece I made in (programmable/sprited) QuickTime, overboard. I realised I could use grammars to specify letter substitutions (and I do understand that this is not a particularly good example of an expressive processing use of grammars, nor is it likely to display any interesting variety of emergence).
But I did also use a second grammar to set/trigger the 'buoyancy' states of the passages (surfacing, floating, sinking). For this we assemble keys (tokens) to pass to the grammar based on a (random grammar-chosen) anticipated state plus the state of one prior phase of the passage in question, so as to be able to bias any buoyancy changes based on the prior state of the passage.
It's intended to be ambient, and variably legible. It uses a different text (not that in overboard) and one of the good things about the re-engineering is that it is easy to apply the sketch to any reasonable-length and properly formatted text.
Built with Processing