Assignment: Generative text

Using what you learned about arrays, strings and text in Processing, make a sketch that randomly generates a piece of text (poetry, prose or anything you want) on every mouse click.
Think about the visual presentation of the text as well.

You can try some exotic stuff like Markov Chains and Context Free Grammars.
This is an introduction by Daniel Shiffman.

Rita is a library specifically designed for generative literature. It contains tools for analyzing, creating and visualizing text. It even has a text-to-speech module.

For example the Haiku Grammar is a fairly simple sketch based on this grammar file.

Posted in

Post a comment