Monday, January 11, 2021

Genuary 2021 Day 11: "Other Source"

 



The prompt for this one kind of puzzled me. It reads:

Use something other than a computer as an autonomous process (or use a non-computer random source).

I guess there are a lot of ways to do generative art without using a computer as the autonomous process - like building a mechanical automaton that generates art - for instance, those mechanical drawing devices: https://en.wikipedia.org/wiki/Maillardet%27s_automaton

And a non-computer random source, well, that's shading into tomorrow's prompt, but it was easier for me to tackle. I downloaded "A Million Random Digits with 100,000 Normal Deviates" and used that as my number stream.  I also grabbed a million digits of pi, as a secondary number stream.

My generator takes a number of digits in x and y to draw, and draws them in a hand-drawn 4x4 pixel font that I made this morning. Many of the digits are legible, and if you squint and know you're looking at a digit, you can guess what the others are.

The more interesting, maybe, thing, is the background, which is a noise function that smoothly interpolates the colors, based on taking a 6 digit value starting at that point, interpreting those six digits as 00-99 in R,G,B. So, the first 7 digits are 1009732 - so the color for the top left of the first digit is (10, 09, 73) and the color of the top left of the second digit is (00, 97, 32), and so on, shifting in new digits as you go across the page.

10x10 random digits

10x10 digits of pi

20x20 random digits

20x20 digits of pi

100x100 random digits

100x100 digits of pi

256x256 random digits

256x256 digits of pi


I intended to do 1000x1000 for a million digits of both the "million random digits" data source and pi, but I'm hitting an exception, maybe an off by one error for one of the data sources. I could look into that, but already, the 256x256 images are pretty smeary and hard to look at.

Tools Used: Pillow (the Python image library, forked off of PIL)

Languages Used: Python

Development Time: ~2 hours

Drawing Time: ~1 minute

What's Generative Here: I use the digits of a digit stream to create a noisy color field, which I evaluate for each point of the background, and I render the literal digits as the foreground.

















No comments:

Post a Comment