Thread: infinite pictures.

  1. #1
    That weird Java guy xniinja's Avatar
    Join Date
    Jun 2010
    Posts
    231

    infinite pictures.

    hello everyone I've been thinking about this one for a while but I was wondering has there ever been or is it possible to make a program that makes every picture combination ever for one resolution lets say 20x20. I don't really know why i am asking this I guess its just an itching question that I've had for a while now. So yea please tell what you think, my opinion on the subject is there are a lot of pictures that are possible and a lot of them wouldn't be anything at all just specks of stuff, and the ones that were recognizable could be very amazing, and some would be disturbing. If anyone knows how many pictures would there be possible for 20x20 due to how many colors possible could you tell me. Thanks.

  2. #2
    Internet Superhero
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    964
    20x20 pixels gives us 400 pixels, there are 256 different values for each of the R, G and B channels (excluding alpha), this means there are 256^3 possible values for each pixel.(16.7 million)

    So 400x16777216 gives us 6,710,886,400 different possible 20x20 pixel images. With a modern computer this could probably be done in a very reasonable amount of time, but what would the point of having all these images be? Who would sort through 6.71 billion different tiny pictures to find what could be accomplished by an artist in 10 minutes?
    How I need a drink, alcoholic in nature, after the heavy lectures involving quantum mechanics.

  3. #3
    Password:
    Join Date
    Dec 2009
    Location
    NC
    Posts
    587
    You should look at combinatorics, a branch of math devoted to these types of problems.

    Think of it like this, you have 0xffffff colors in the standard hex color system. Each of the 20x20 pixels could be any of those 0xffffff colors. We will invent a method for incrementing the colors. It will be like so, increment the first pixel, if it is 0xffffff, st it to 0 and increment the next pixel. Do this recursively. You can see it would take 0xffffff iterations to change the second pixel, and 0xffffff changes in the second pixel to change the third. We should then notice the pattern, that it would take 0xffffff^n to change the nth pixel. We have 20*20 pixels, and we want to go through all colors, so we extend this pattern to 20*20 pixels. It would take 0xffffff^(20*20) = 16777215^400 = 4014959061089910785.
    Last edited by User Name:; 01-24-2011 at 05:27 PM.

  4. #4
    That weird Java guy xniinja's Avatar
    Join Date
    Jun 2010
    Posts
    231
    wow thats amazing. And I dont know why anyone would do this I just like the idea of having all of everything. The idea that you would have any 20x20 image ever past, present, or future. Every single picture ever taken or will be taken is in your possession, every thing possible or impossible would be able to be seen. The creepiness of it all too, the fact that if you have a 20x20 picture, its in there...

  5. #5
    Password:
    Join Date
    Dec 2009
    Location
    NC
    Posts
    587
    Actually, my calculator overflowed massively. The real number is
    77260652960465053840806022157165047272943619541401 60747299426268720117916893973505783144387803819180 40281113813233312413458704108427207593248916788881 05795268187640462548419359594706029787810055042201 00430664922956656374349558515466143080470447649568 35902033036032188811391194828515666273715604551162 14107929312020310328321712827002828361215960870168 27175321435621626934143770355551984304007710037351 86333991629014571058532585760788717032950137183427 75362174173283875870393490787928755582611502708301 58340380131967291430480041857268062905822936298573 28448955217639083211454091773079240281334170124155 31537600014068477224531071459748891736731594806028 03673623192151031736402832878033878371291183989935 30434269168406478930130972047936763801392838704309 11810565321763288234657997371934185760486591957311 02224333831237799650368883559208023813294743278881 81845261208213782026997584492768882582671671687865 08539961992999644711007922939712480267306563531387 74182910357257117239800036987323653839904571790118 46297078453827555152964344779203105571920351325698 48043636199445607443111954580341917944325290216921 43953737784856234799082506229860772512630051381429 75917299140652889698599996244446258488401446034804 70343616945127264431470576822920276870475757989512 09673707129788546192056560793788970951591006494123 15533545756028733002422691539720916076563581804378 48834459452441574802193483824595349206349483973811 58560692394048962969941167652160003896299347966855 16725304135691852980679375235136398444277366524930 30753645839854717712471537934713025001407716335563 69508218197224282185964317664066523492371528578815 26994115194418981505175029917291635443037890649234 86884771634297716887469989081222749764000016787997 66411267158626362152514619103537341289152460176171 60947203059171379114197723873491687932071258214339 53237197261327712915356547240400265155114066569388 90061672395238403180300948646474840907778768438679 28816778651940065176469327807681883877413405243549 63997990343608358325477253859200912669743965704440 70904548458043992871600152985914460987825403809113 94164146449035181307175017774502039786122998804739 22387234930795870222994484804040646381657449627666 29889576592034110709340900064209904831809590005670 42974859151042121425622827025625812201797673286695 77796676480067509407344210695966463611268868224727 72844796645901329337267331591132642199925930459155 36323983027992846058160873030064192037884526822221 96200877279978477656231650054242284348754554762128 70645855363100691152459967994384685509457925986970 27281094665201345599891448336692431943670498376028 47514993746770595303765068716057448336866955471803 98413870190103452105115747735343241389162393868923 11516349307186760939510912378422075243602666122530 13046606721525958970514541700331493782380688778342 19807634555608630158451357921157684349345784731098 01584831946714761388218554503864873637119813829974 4877376773269155901925046573938692325376

  6. #6
    That weird Java guy xniinja's Avatar
    Join Date
    Jun 2010
    Posts
    231
    oh... thanks, how fast could a FAST computer do this in

  7. #7
    Password:
    Join Date
    Dec 2009
    Location
    NC
    Posts
    587
    We'll guess an outrageously small amount of time for a single picture, 1 ps(10^-12 s) each.

    31230918038444956404014312681444408390879313780281 41801171359272619326754627745994324970559872179604 29838301029710160299651078669614688096224449049434 81768300072206518088039843875983151592886291894784 55081680767654290208729826109222426764983176107474 84316217661914171545314450220891730216142524948383 85321068927897070111477758617779509005854282617883 53373905366202107957525494613786692497352729660301 91595377570812499767935264010598381934614889501352 21309189505434628482973908510994622785501989892170 63287871308702996658329337624183464919603531781318 50024683348172562534829192131544019189977901591029 34562510068733473252545747719660737916967598989010 81195827627582738312439224481647813512564173214678 54257027015857015089641281222284415116166069294439 40134723624097086745862779492274029691530780185763 56551505827292554690403036400286409705376690939134 54740219769515947563198968674737849873629325874370 40726728240512358593797914538330078912520645904378 10669384144714891022446514614322670348756273030418 24471388357358419963219112985094242766801073490711 92104286862436318863042683782307080103831681268551 86352687408748662444899522720030665280872392469138 26880344120968197617905138488477677463858338680460 18234119913954381252543942351749433499560304055638 59624937917939374434778586480313287013271801564883 18057688719491038385643597965369767620480682553182 92889172331541606842112906914969299714701918517603 38891649392625711422308924429249934353289795675574 71065575052268006376638495263582414600079445673045 00142569881973281862281054149675888514103271268672 42965184427535378496134686224240499327895811122762 08900965812295773481935013094705382151962397677763 191426717965 billion years

    To give you an idea of scale, Andromeda and the Milky Way are expected to collide in ~4.5 billion years.

    Code:
    #!/usr/bin/perl
    
    use bigint;
    
    print (((256**3)**400) / (10**12 * 31556926 * 10**9)); # pictures / (pictures/s * s/y * y/by)
    Last edited by User Name:; 01-24-2011 at 08:57 PM.

  8. #8
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,613
    Quote Originally Posted by xniinja View Post
    wow thats amazing. And I dont know why anyone would do this I just like the idea of having all of everything. The idea that you would have any 20x20 image ever past, present, or future. Every single picture ever taken or will be taken is in your possession, every thing possible or impossible would be able to be seen. The creepiness of it all too, the fact that if you have a 20x20 picture, its in there...
    Art isn't just color you guys.

  9. #9
    Password:
    Join Date
    Dec 2009
    Location
    NC
    Posts
    587
    Quote Originally Posted by whiteflags View Post
    Art isn't just color you guys.
    Yes, we would need a complex algorithm to weed out the crappy ones.

  10. #10
    -bleh-
    Join Date
    Aug 2010
    Location
    somewhere in this universe
    Posts
    463
    Quote Originally Posted by User Name: View Post
    Yes, we would need a complex algorithm to weed out the crappy ones.
    Impossible to do a comparision between a "crappy" art and "good" art. If I have a hand on that algorithm, all the Picasso would be weeeded out pretty quick.
    "All that we see or seem
    Is but a dream within a dream." - Poe

  11. #11
    That weird Java guy xniinja's Avatar
    Join Date
    Jun 2010
    Posts
    231
    we only need to get 31230918038444956404014312681444408390879313780281 41801171359272619326754627745994324970559872179604 29838301029710160299651078669614688096224449049434 81768300072206518088039843875983151592886291894784 55081680767654290208729826109222426764983176107474 84316217661914171545314450220891730216142524948383 85321068927897070111477758617779509005854282617883 53373905366202107957525494613786692497352729660301 91595377570812499767935264010598381934614889501352 21309189505434628482973908510994622785501989892170 63287871308702996658329337624183464919603531781318 50024683348172562534829192131544019189977901591029 34562510068733473252545747719660737916967598989010 81195827627582738312439224481647813512564173214678 54257027015857015089641281222284415116166069294439 40134723624097086745862779492274029691530780185763 56551505827292554690403036400286409705376690939134 54740219769515947563198968674737849873629325874370 40726728240512358593797914538330078912520645904378 10669384144714891022446514614322670348756273030418 24471388357358419963219112985094242766801073490711 92104286862436318863042683782307080103831681268551 86352687408748662444899522720030665280872392469138 26880344120968197617905138488477677463858338680460 18234119913954381252543942351749433499560304055638 59624937917939374434778586480313287013271801564883 18057688719491038385643597965369767620480682553182 92889172331541606842112906914969299714701918517603 38891649392625711422308924429249934353289795675574 71065575052268006376638495263582414600079445673045 00142569881973281862281054149675888514103271268672 42965184427535378496134686224240499327895811122762 08900965812295773481935013094705382151962397677763 191426717965 billion computers. Well that gives us the problem that there are only 10^81 atoms in space (or so i've been told, i don't agree). another fun number fact there are about 10^100000 ways a chess game could be played out.

  12. #12
    Password:
    Join Date
    Dec 2009
    Location
    NC
    Posts
    587
    Quote Originally Posted by nimitzhunter View Post
    Impossible to do a comparision between a "crappy" art and "good" art. If I have a hand on that algorithm, all the Picasso would be weeeded out pretty quick.
    I don't think Picasso painted in 20x20 resolution, so all the Picasso are weeded out by default.

    xniinja: I don't think that many computers would scale too well. They'd all have to have half the collective computing power just to handle the epic amount of communication required to coordinate a cloud that massive.

  13. #13
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Quote Originally Posted by User Name: View Post
    To give you an idea of scale, Andromeda and the Milky Way are expected to collide in ~4.5 billion years.
    What??!! Great, now you tell me...
    I'd better start preparing now.
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

  14. #14
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by xniinja View Post
    wow thats amazing. And I dont know why anyone would do this I just like the idea of having all of everything. The idea that you would have any 20x20 image ever past, present, or future. Every single picture ever taken or will be taken is in your possession, every thing possible or impossible would be able to be seen. The creepiness of it all too, the fact that if you have a 20x20 picture, its in there...
    To give you a further idea of scale... Windows 7 Icons... the fancy ones you can resize with your mouse wheel, are 256 x 256 x 16.7 million colors....

    That's ~10,944,512,000,000 possible images.

    I recently wrote a windows program using one of the new Icons and the Icon embedded in the program was bigger than the executable code...

  15. #15
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by cpjust View Post
    What??!! Great, now you tell me...
    I'd better start preparing now.
    Blast from the past (Very weird movie)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. CConstructor Infinite Recursion!
    By Eman in forum C++ Programming
    Replies: 80
    Last Post: 12-23-2010, 10:14 AM
  2. Tagging Pictures
    By Tonto in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 03-17-2008, 02:44 PM
  3. Switch statement = infinite loop
    By Lucid003 in forum C++ Programming
    Replies: 10
    Last Post: 10-10-2005, 12:46 AM
  4. pictures
    By TravisS in forum A Brief History of Cprogramming.com
    Replies: 21
    Last Post: 01-06-2003, 02:31 PM