### THE BURIAL OF THE FIRE SERMON: Markov chains with pixel columns

Some visual/asemic poetry today. Here's how it was done: I blitted the text of Eliot's "The Waste Land" into a graphics buffer, then stored n-grams of length N, where each gram was an individual column of pixel data. I then used a Markov chain algorithm to randomly select columns of pixel data, which I blitted back to the screen. At low values of N, the result is jumbled-up (but still organic) letterforms. At higher values of N, the text regains legibility. Here's N=2:

Made with processing.py. I used codeman38's excellent PCSenior font (though I'd like to try it with other fonts!). Other values of N after the jump.

N=1 (I like this one the best!)

N=3 (not as many scrambled letter forms)

N=5

N=10 (nearly all letter forms appear whole, some textual coherence)

N=32 (begins to look like a Markov chain based on character-level n-grams)