Pi, now in color.

Hungry for pi?

A little while ago I had a revelation. I wanted to see as many of the digits of pi as I could with one glance, but you can only identify so many numbers on a screen at a time. So, I found a file with pi calculated out to 4 million digits (http://zenwerx.com/pi.php). This still wasn't helpful, because I'd have to scroll, and I don't like that.

Wrote a php script which reads in the characters of pi one at a time. I assigned a single color to each character, 0 = white, 1 = teal, 2 = blue, etc. I create an image, and starting at position 0,0, I draw in my pi calculation one pixel at a time. Below is pi in a 200 X 200 image, which means it represents the first 40,000 digits of pi.

All you need.

You will need two files, piImage.php and the pi file.

Get Creative

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

If you wish to play with the php script yourself, or use the images for something, be my guest. I would love to hear about it!

Talk to me!

I would love to hear any feedback, suggestions, complaints, praise, rants, prophecies, or limericks, so e-mail me. (tim@hithlonde.com)