Thinking more about those images of PI from the other day, I mentioned that I was inspired to see what PI looks like ploted as a bar graph. I can’t believe I found the time for this little project, but I’m glad that I did! I started with a text file that includes the first 100,000 digits in PI, using that as a place to pull my data from. I only ploted the first 1000 digits, so that it wouldn’t take over the entire width of my screen. Also, I multipled the length of each line by a factor of 10, just to give it a bit more height. Here is PI, ploted as green bars across the top of a black background:
I then assigned a random color to each digit, and replotted. Here is that image:
If you’re interested, you can see from the code that the mapping of digits to colors went like this: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. That is …. black, blue, cyan, green, magenta, orange, pink, red, white, and yellow.
I am partial to using a solid color, like the green image above. I think it represents a neat image. Could it show a pattern?? Does it mimic a radio wave, a sine wave, or an XRay?? That … I do no know … but it is something interesting (at least to me) to think about!