Only FULL VIEW gives the right image!
My sister wanted to know how dense prime numbers are distributed. She wanted a visual representation so I wrote a little python script using PIL
that generates a picture where each pixel represents an integer >= 0. The white pixels are normal numbers, the red ones are prime numbers. The pixel at the top left represents the number 0, the pixel at the bottom right represents the number 1310719.
Get the python script as GitHub Gist
(I know it could be written better/faster).
python visprim.py 1280 1024 visprim.pngUpdate:
I rewrote it in C++ using Magick++
. I also added multithreading support so it runs faster on multiprocessor systems.
Get the C++ source as GitHub Gist
visprim 1280 1024 visprim.png 2
PS: I know the category isn't correct, but which category would be a better fit? deviantART forces me to select a certain sub-category. I can't just select "Digital Art".