Wednesday, December 12, 2007

What is this?


Any idea what this is a picture of?

Ok, so it is a cellular automation, but where did the symmetry come from? Here is the generating snipit of python code.
   def getArray(self):
if self.count == 0:
out = random((self.w + 1, self.h + 1))
else:
out = self.data[:,:]
out[:,0] = 0
out[:,-1] = 0
out[0,:] = 0
out[-1,:] = 0
out[1:-1,1:-1] = (out[2:, 1:-1] +
out[1:-1,2:])/2.
out += .01
i_s, j_s = where(greater(out, 1))
for i, j in zip(i_s, j_s):
out[i, j] = 0
r = out.ravel()
self.count += 1
self.data = out
return out

No comments: