You'll do it by creating a one-dimensional CA with a very simple rule.
What's happening is this: the shell is growing a little bit at a time, and each new bit of shell that is added has a pattern determined by the most recently created bit of shell.
-
In the lattice, you'll only update one row of cells at a time.
-
Each cell has one of two states, which I'll call on and off. You'll have to find some way of representing these states.
-
You'll start with a row of cells at the very top of the lattice. (These are the patches with pycor = (-1 * screen-edge-y).) All these cells are off, except for the centermost cell in that top row. (That's the one with pxcor = 0.)
-
In each time step, you'll update the states of the next row of cells. How do you do this? Define some global variable that keeps track of what row you're at. Remember that the top row consists of the patches with pycor = (-1 * screen-edge-y), the middle row consists of the patches with pycor = 0, and the bottom row consists of the patches with pycor = screen-edge-y. You'll have to write some sort of while loop. If you don't know how to do while loops in Netlogo, look here:
http://ccl.northwestern.edu/netlogo/docs/.
-
The rule: each cell in the new row looks to the cell immediately above it, and to the two cells above and to either side. The update looks like this, with 0 for off and 1 for on. How to read the rules as I've written them: to the left of the arrow are the states of three cells in the previous row. The first state is the cell one position to the left of the current cell, in the previous row. (That is, relative to the cell you're updating, it's up and to the left by one.) The second state is the cell in the same position as the cell you're updating, but in the previous row. The third state is for the cell one position to the right of the cell being updated, in the previous row. To the right of the arrow is the new state for the cell you're updating. So, look at the fourth rule below, 011 --> 1. In words, this means that you're looking for the state of the cell in the ith position at time t+1, look at the cells in positions i-1, i, and i+1 at time t. If cell i-1 at time t has state off and cell i in time t has state on and cell i+1 in time t has state on, then cell i in time t+1 should have state on. So, the rules:
-
000 --> 0
-
001 --> 1
-
010 --> 0
-
011 --> 1
-
100 --> 1
-
101 --> 0
-
110 --> 1
-
111 --> 0
-
See whether it makes a difference when you prevent wrap-around. How do you do that? Define separate behavior for cells on the edges. Edge cells have abs pxcor = screen-edge-x.
