Pie Day!

Pie Day!

and keeping with the mathematics, here’s an octave version of conway’s game of life! thanks sasha! happy birthday!

N=100;
axis([0 N+1 0 N+1], "manual","square", "nolabel");
H=diag(ones(1, N-1), 1) + diag(ones(1, N-1), -1) + eye(N);
A=round(rand(N));
for i =1:1000;
 An = H*A*H-A;
 A(find(An<2 | An>3)) = 0;
 A(find(An==3)) = 1;

 [x, y] = find(A);
 plot(x, y, 'o;;');
 pause(0.2);
end;

that should answer benno’s question.

Happy Pie Day!