An Experiment in Text as Numbers and the Library of Babel

harry potter and the philosopher's stone.png

The above image is ‘Harry Potter and the Philosopher's Stone’. Whilst browsing the internet I came across the website ‘Library of Babel’. This website contains all possible pages containing 3200 characters, adding up to around 10⁴⁶⁷⁷ books. It works by using a pseudo-random number generating algorithm to produce the books in without needing to store the actual book itself.

Inspired by this website, I had the idea, that instead of using a number generator, to just compress the text down and use that as the index. So I created a program that took text and converted it to a number by treating the text as though it was in a base 75 number system. (a being equal to 0, b being equal to 2 and etc) And then converting that number into base 65535 by using every symbol in unicode to represent a digit. So “Hello World” would become:

This created a similar effect as the website however instead of a pseudo-random number generator, it simply condensed the text down.

This then gave me the idea to convert the text into base 4294967295. And instead of representing each digit as a symbol to represent it as a 32 bit ARGB colour. (4294967295 being the number of colours possible) and then rendering this in processing, creating the above image.

Romeo and Juliet

Romeo and Juliet

Library of Babel: click here
Processing: click here