File:Conways game of life breeder animation.gif
From Wikimedia Commons, the free media repository
Jump to navigation
Jump to search
Conways_game_of_life_breeder_animation.gif (379 × 192 pixels, file size: 753 KB, MIME type: image/gif, looped, 499 frames, 11 s)
File information
Structured data
Captions
DescriptionConways game of life breeder animation.gif | Animation of breeder pattern in Conway's Game of Life |
Date | (UTC) |
Source | |
Author |
|
Permission (Reusing this file) |
See below |
Recognition
[edit]
|
Licensing
[edit]I, the copyright holder of this work, hereby publish it under the following license:
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Source Code
[edit]The first generation is the bmp file 000001.bmp (which should be saved in the same folder as the script).
a=file('000001.bmp','rb+')
head=a.read(54);mat=[];wid=379;hei=192
for l in range(wid): mat.append([False]*hei)
for y in range(hei):
for x in range(wid):
mat[x][y]=(a.read(3)==chr(0)*3)
useless=a.read(wid%4)
def num(x,y):
options=[]
options.append(mat[(x+1)%wid][(y )%hei])
options.append(mat[(x+1)%wid][(y+1)%hei])
options.append(mat[(x )%wid][(y+1)%hei])
options.append(mat[(x-1)%wid][(y+1)%hei])
options.append(mat[(x-1)%wid][(y )%hei])
options.append(mat[(x-1)%wid][(y-1)%hei])
options.append(mat[(x )%wid][(y-1)%hei])
options.append(mat[(x+1)%wid][(y-1)%hei])
return options.count(True)
def newgen():
newmat=[]
for l in range(wid): newmat.append([False]*hei)
for y in range(hei):
for x in range(wid):
numnum=num(x,y)
if not mat[x][y] and numnum==3: newmat[x][y]=True
elif mat[x][y] and (numnum==2 or numnum==3): newmat[x][y]=True
return newmat
for l in range(2,499):
b=file(str(l).zfill(6)+'.bmp','wb+')
b.write(head);mat=newgen()
for y in range(hei):
for x in range(wid):
b.write(chr(255-255*int(mat[x][y]))*3)
b.write(chr(0)*(wid%4))
print chr(8)*30+str(l).zfill(6)+'.bmp finished.',
Original upload log
[edit]This image is a derivative work of the following images:
- Image:Conways_game_of_life_breeder.png licensed with Cc-by-sa-3.0, Cc-by-sa-3.0
- 2008-11-02T13:34:51Z Hyperdeath 379x192 (2881 Bytes) {{Information |Description= Breeder pattern in Conway's Game of Life |Source=self-made |Date= |Author= [[User:Hyperdeath|Hyperdeath]] |Permission= |other_versions= }}
Uploaded with derivativeFX
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 22:03, 4 March 2014 | 379 × 192 (753 KB) | Protious (talk | contribs) | Reverted to version as of 01:30, 29 November 2008 - original version pauses for half a second at the end and shows the different parts of the breeder marked in different colors - better illustration | |
04:13, 17 March 2012 | 379 × 192 (647 KB) | Aiyizo (talk | contribs) | Optimized | ||
01:30, 29 November 2008 | 379 × 192 (753 KB) | Protious (talk | contribs) | {{Information |Description=Animation of breeder pattern in Conway's Game of Life |Source=*Image:Conways_game_of_life_breeder.png |Date=2008-11-29 01:23 (UTC) |Author=*derivative work: ~~~ *Image:Conways_game_of_life_breeder.png: [[User:Hyperde |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
File usage on other wikis
The following other wikis use this file:
- Usage on cy.wikipedia.org
- Usage on de.wikipedia.org
- Usage on el.wikipedia.org
- Usage on en.wikipedia.org
- Portal:Mathematics/Featured picture archive
- User talk:Protious
- User:Shoemaker's Holiday
- Breeder (cellular automaton)
- Wikipedia:Featured pictures thumbs/16
- Wikipedia:Featured picture candidates/March-2009
- Wikipedia:Featured picture candidates/Breeder
- Wikipedia:Wikipedia Signpost/2009-03-16/Features and admins
- User talk:Shoemaker's Holiday/Archive 4
- Portal:Mathematics/Featured picture/2009 07
- Wikipedia:WikiProject Mathematics/Recognized content
- Template:POTD/2010-03-13
- Wikipedia:Featured pictures/Sciences/Mathematics
- Portal:Mathematics/Selected picture
- Portal:Mathematics/Selected picture/16
- Wikipedia:Wikipedia Signpost/2009-03-16/SPV
- Portal:Mathematics/Recognized content
- User:Theki/OLD1
- Wikipedia:Wikipedia Signpost/Single/2009-03-16
- Usage on en.wikibooks.org
- Usage on en.wiktionary.org
- Usage on fr.wikipedia.org
- Usage on he.wikipedia.org
- Usage on pl.wikipedia.org
- Usage on ru.wikipedia.org
- Usage on zh.wikipedia.org