Re: Cellular automata and image manipulation

2006-05-14 Thread defcon8
Actually never mind either. I guessed I needed to append all values after eachother in one row list: x = [] for y in buff: for z in y: x.append(z) thanks for the help -- http://mail.python.org/mailman/listinfo/python-list

Re: Cellular automata and image manipulation

2006-05-14 Thread defcon8
Sorry this is the latest, the previous didn't work so well: import Image x = [] buff = [] buff = [[0 for y in range(41)] for x in range(21)] buff[0][(len(buff[0])-1)/2] = 1 def rule1(): for i in range(len(buff)-1): for j in range(len(buff[0])-1): if i == len(buff)-1:

Re: Cellular automata and image manipulation

2006-05-14 Thread defcon8
import Image x = [] buff = [] buff = [[0 for y in range(41)] for x in range(21)] buff[0][(len(buff)-1)/2] = 1 def rule1(): for i in range(len(buff)-1): for j in range(len(buff[0])-1): if i == len(buff)-1: break elif j == 0: if buf

Re: Cellular automata and image manipulation

2006-05-14 Thread defcon8
It seemed to work with a 1d list but not with 2d. -- http://mail.python.org/mailman/listinfo/python-list

Re: Cellular automata and image manipulation

2006-05-14 Thread defcon8
Thank you very much. That is highly simple, useful and it works. -- http://mail.python.org/mailman/listinfo/python-list

Re: Cellular automata and image manipulation

2006-05-13 Thread John Bauman
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello. I have recently been experimenting with cellular automata and I > would like to know how I could convert a 2d list of 0's and 1's into > white and black squares on an image. I have tried to install matplotlib > and also NumTut b

Re: Cellular automata and image manipulation

2006-05-13 Thread Robert Kern
[EMAIL PROTECTED] wrote: > Hello. I have recently been experimenting with cellular automata and I > would like to know how I could convert a 2d list of 0's and 1's into > white and black squares on an image. I have tried to install matplotlib > and also NumTut but both to no avail. There seem to be

Cellular automata and image manipulation

2006-05-13 Thread defcon8
Hello. I have recently been experimenting with cellular automata and I would like to know how I could convert a 2d list of 0's and 1's into white and black squares on an image. I have tried to install matplotlib and also NumTut but both to no avail. There seem to be bugs in their installation and I