Here’s a program that will show a picture of you every instant from before you were born till after you die. In fact it will do that for every person who ever lived, is living, and yet to be born. It will also show every program ever written plus all the programs not yet written. It will show you the answer to every question asked plus those not asked yet. In other words, this program will show you a picture of everything and anything. You’re probably wondering what I’m talking about. Well, this code is set up to show every rgb color combination for every pixel of the display. It assumes the alpha of the color is always 255. Just in case you’re anxious to run this, don’t bother. It will take 6.27 x 10 ^ 4,155,880 years to run this to completion. That’s 461,764 times longer than the existence of the Universe so far. As I said in the title, it’s thought provoking. If you do try to run this, you’ll see the parameter values change, with a red pixel in the lower left corner of the screen when the r value of the parameter.watch gets high. In other words, if you can take a picture of something, it will be shown here at some point in time. Even pictures that can’t be taken will be show here. I think I did all the calculations correct.
supportedOrientations(LANDSCAPE_ANY)
function setup()
parameter.watch("x")
parameter.watch("y")
parameter.watch("rgb")
img=image(WIDTH,HEIGHT)
print("It will take 3.2363 days to display all the color combinations for the first pixel.")
print("It will take 6.279478 x 10^4155880 years for this program to complete.")
print("The age of Universe is 13.798 x 10^9 years.")
print("This program will take 461764.44 times longer than the Universe existed so far.")
print("Dont expect anything usefull from this program anytime soon.")
x=1
y=1
r=0
g=0
b=0
end
function draw()
background(0)
img:set(x,y,r,g,b)
sprite(img,WIDTH/2,HEIGHT/2)
r=r+1
if r>255 then
r=0
g=g+1
if g>255 then
g=0
b=b+1
if b>255 then
b=0
x=x+1
if x>WIDTH then
x=1
y=y+1
if y>HEIGHT then
print("done")
end
end
end
end
end
rgb=string.format("%3d %3d %3d",r,g,b)
end