Jump to content

File:Conways game of life breeder animation.gif

This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia

Conways_game_of_life_breeder_animation.gif (379 × 192 pixels, file size: 753 KB, MIME type: image/gif, looped, 499 frames, 11 s)

Description Animation of breeder pattern in Conway's Game of Life
Date (UTC)
Source
Author
Permission
(Reusing this file)
See below

Recognition

Wikipedia

 This is a featured picture on the English language Wikipedia (Featured pictures) and is considered one of the finest images. See its nomination here.

If you think this file should be featured on Wikimedia Commons as well, feel free to nominate it.
If you have an image of similar quality that can be published under a suitable copyright license, be sure to upload it, tag it, and nominate it.

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
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

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

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

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

29 November 2008

image/gif

406d5a6c42cc5ce754be6f55cf700814944031a4

770,706 byte

11.499999999999876 second

192 pixel

379 pixel

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current22:03, 4 March 2014Thumbnail for version as of 22:03, 4 March 2014379 × 192 (753 KB)ProtiousReverted 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 2012Thumbnail for version as of 04:13, 17 March 2012379 × 192 (647 KB)AiyizoOptimized
01:30, 29 November 2008Thumbnail for version as of 01:30, 29 November 2008379 × 192 (753 KB)Protious{{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

Global file usage

The following other wikis use this file: