staff project download information miscellaneous
Trend Download   One Dimensional Cellular Automata
  Download

Trend Tutorials
Trend Basics
Game of Life
One Dimensional CA
Mouse Maze
1-D Bubble Sort
Animation


More Trend Examples

 
MangoVect DownloadPicky DownloadLucy2 DownloadGRAMAUBViz DownloadgeneDBN Download
3. The Rule in Action (continued)

The symbols continue to spread to the right of the CA space until it reached another o symbol in the CA space. It may be misleading in the example, but the reason the spreading to the right stops is because the condition in line 15 no longer applies. Not because the symbols have reached the edge of the screen. In TREND, there is no edge to the CA space. The symbols continue through to the other side without any break in the line.
The images below show the CA space at epoch 38 and 39.





At epoch 39, there are no more "dead" ctrl fields in the first row. So the condition in line 15 is no longer satisfied. So the statement in line 16 will no longer be executed.

So what happens at the next epoch?



At epoch 40, the symbols appear to move down the CA screen. The condition in bold in line 25 is now applicable at epoch 40.

25 if (no:ctrl==top:ctrl+1 || no:ctrl==0 && top:ctrl==225)
26 {
27 ctrl=no:ctrl+1;
28 sum=nw:cell+no:cell+ne:cell;
29 cell=table[sum];
30 }




In the image above, the red X's are again just to show the fields that are being affected by the condition. Line 25 basically says that if the NO:CTRL has a value of one greater than the TOP:CTRL, then execute line 27 and make the current CTRL the same value as the NO:CTRL plus one.


Last modified June 13, 2008 . All rights reserved.

Contact Webmaster

lab