Java code to generate the automaton here.
<%!
int rule = 110; // rule number in Wolfram notation
int width = 400;
int length = 400;
public void automate(Writer writer) throws IOException
{
Random random = new Random();
boolean[] current = new boolean[width];
boolean[] last = new boolean[width];
// setup a random first line
for(int i = 0; i < width; i++)
{
last[i] = random.nextBoolean();
writer.write(last[i] ? 'M' : ' ');
}
writer.write('\n');
for(int line = 0; line < length; line++)
{
for(int cell = 0; cell < width; cell++)
{
int left = cell - 1;
if(left < 0) { left = width - 1; }
int right = cell + 1;
if(right == width) { right = 0; }
int choice = 0;
if(last[left]) { choice |= 0x04; }
if(last[cell]) { choice |= 0x02; }
if(last[right]) { choice |= 0x01; }
current[cell] = ((rule >> choice) & 0x01) == 1;
writer.write(current[cell] ? 'M' : ' ');
}
writer.write('\n');
System.arraycopy(current, 0, last, 0, width);
}
}
%>
