Cellular Automata Tutor: Mustafa El Sayed Ilya Pereyaslavtsev Pavlina Vardoulaki Cosku ร inkiliรง Ahmed Shokir
2
Table of content: - CA explained - Code - 2D Expermentation - 3D Stacking - Selective stacking - Probability map - Physical models
3
0
1
2
3
4
5
6
7
8
9
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
1
0
0
0
2
0
1
0
0
0
1
1
1
0
0
3
0
0
0
0
0
0
1
0
0
0
4
0
0
0
1
0
0
0
0
0
0
5
0
0
0
1
1
0
0
0
0
0
6
0
0
0
0
0
1
0
0
0
0
7
0
0
0
0
0
0
0
0
0
0
8
0
0
0
0
0
0
0
0
0
0
9
0
0
0
0
0
0
0
0
0
0
STAY
1
2
2
2
0 4
2
3
3
4
true --->> true 1 --->> 1
S
2 BORN
3
5
6
4
1
2
3
4
3
2
1
2
3
2
1
5
false --->> true 0 --->> 1
B
DIE 1
true --->> false 1 --->> 0
D
Grid based system
Neighborhood system
Rule driven simulation
The grid logic is inextricably linked with 2d(3d) array grid, it stores and calculates information and it is also a method of computing voxels in space.
Array based systems allows us to find neighbors more easily than system without array hierarchy.
Every frame in the simulation allows the system to check the array and depending on the previous state make intelligent decisions based on its number of neighbors.
4
The code infrastructure explores the basic CA system through logics like image base where the cellular automata follows a static image imprint. Age based where the Voxels have a set age limit after that they are eliminated. And Rule shifting where the Rules shift states between different rules accord to time limit.
Grid
Neighbourhood Time
Grid
Rules
Manual input
Image input
State
1
0 1
Age
Age limit
Time
State
0
Image based
Neighbourhood Population Rules
Stacking
Age based
Selective stacking
Rule shifting
Rule shifting Age limit
Stacking
Selective stacking Display
Manual input
2D Cellular automata // Code
5
The voxels rapidly change state from 1 to 0 to create the effect of “on and off�.
pulsation
The voxels are in a stable state, They are consistent and not changing position or state.
stable In a glider state the voxels are Change position in pair or triplet. Transfer from one grid point to another in a Organized fashion.
gliders
In this condition the Voxels grow and constantly Change their boundary .
growing 6
2D Cellular automata patterns
7
Growth_Rule13_ref3
Growth_Rule15_ref3
Growth_Rule22_ref7
Elimination_Rule3_ref1
Growth_Rule17_ref2
Growth_Rule24_ref2
Elimination_Rule12_ref1
Pulsation_Rule2d_ref1
Elimination_ Rule19_ref5
Pulsation_Rule2d_ref3 8
Growth_Rule18_ref1
Growth_Rule21_ref3
Growth_Rule21_ref2
Growth_Rule29_ref3
Growth_Rule29_ref2
Elimination_Rule20_ref5
Elimination_Rule37_ref1
Elimination_Rule28_ref3
Pulsation_Rule4_ref4
Pulsation_Rule32_ref1
2D Cellular automata patterns
9
Max Living - 532 if (mystate== 1 && neighbour < 3) state=0; else if (mystate==1 && neighbour <= 5 && neighbour >=3 ) state=1; else if (mystate==1 &&neighbour > 6) state=0; else if (mystate==0 && neighbour== 3) state=1;
The voxels consistently grow until they reach the edge of the grid, Pulsation happens right after rapidly expanding until they reach saturation.
2D cellular automata patterns // Growth // Rule13_ref3
10
Max Living - 476 if (mystate== 1 && neighbour < 2) state=0; //any conditions else if (mystate==1 && neighbour < 4 && neighbour>=2 ) state=1; else if (mystate==0 &&neighbour >= 3 && neighbour <7) state=1; else if (mystate==0 && neighbour > 7) state=1; else if (mystate==1 && neighbour == 9) state=1;
The voxels consistently grow from the coners of the grid until they connect, Pulsation happens with more voids in between the grid spaces.
2D cellular automata patterns // Growth // Rule21_ref4
11
Living - 378 if (mystate== 1 && neighbour < 2) state=0; else if (mystate==1 && neighbour < 4 && neighbour>=2 ) state=1; else if (mystate==0 &&neighbour >= 3 && neighbour <5) state=1; else if (mystate==1 && neighbour > 5) state=0;
The voxels grow from the edges of the image creating different pulsation effects, in this model pulsation happens as the voxels grow.
2D cellular automata patterns // Pulsation // Rule 2D _ ref3
12
Max Living - 354 if (mystate== 1 && neighbour < 2) state=0; else if (mystate==1 && neighbour < 4 && neighbour>=2 ) state=1; else if (mystate==0 &&neighbour >= 3 && neighbour <5) state=1; else if (mystate==1 && neighbour > 5) state=0;
The voxels grow from the corners with unpredicted behaviour the voxels tend to connect on more broader scope.
2D cellular automata patterns // Pulsation // Rule 4_ref4
13
Max Living - 208 if (mystate== 1 && neighbour < 2) state=0; //any conditions else if (mystate==1 && neighbour < 3 && neighbour>=1 ) state=1; else if (mystate==0 &&neighbour >= 3 && neighbour <4) state=1; else if (mystate==1 && neighbour > 4) state=0;
The voxels are switching off and creating different patterns as the grid is they end up all eliminated.
2D cellular automata patterns // Elimination // Rule3_ref1
14
Max Living - 152 if (mystate== 1 && neighbour < 3) state=0; //any conditions else if (mystate==1 && neighbour <= 4 && neighbour >=3 ) state=1; else if (mystate==1 &&neighbour > 4) state=0; else if (mystate==0 && neighbour== 3) state=1;
2D cellular automata patterns // Elimination // Rule12_ref1
15
After learning the behaviours of cellular automata in two- dimension, we started to apply these patterns in three dimensional space to see the effects and how can we develop it more.
16
3D cellular automata // Stacking
17
Rule1_ref1
Rule2d_ref1
Rule2d_ref3
Rule3_ref1
Rule15_ref3
Rule17_ref2
Rule18_ref1
Rule20_ref5
18
Rule3_ref3
Rule4_ref2
Rule4_ref4
Rule13_ref3
Rule21_ref3
Rule21_ref4
Rule24_ref2
Rule28_ref3
3D cellular automata // Stacking
19
Rule1_ref1
Rule4_ref4
Rule13_ref3
if (mystate== 1 && neighbour < 2) state=0; else if (mystate==1 && neighbour < 4 && neighbour>=1 ) state=1; else if (mystate==0 &&neighbour >= 3 && neighbour <4) state=1; else if (mystate==1 && neighbour > 5) state=0;
if (mystate== 1 && neighbour < 2) state=0; else if (mystate==1 && neighbour <= 3 && neighbour>=2 ) state=1; else if (mystate==0 &&neighbour >= 3 && neighbour <=4) state=1; else if (mystate==1 && neighbour > 5) state=0;
if (mystate== 1 && neighbour < 3) state=0; else if (mystate==1 && neighbour <= 5 && neighbour >=3 ) state=1; else if (mystate==1 &&neighbour > 6) state=0; else if (mystate==0 && neighbour== 3) state=1;
20
Rule15_ref3
Rule21_ref4
Rule24_ref2
if (mystate== 1 && neighbour < 2 && neighbour > 2) state=0; else if (mystate==1 && neighbour <= 4 && neighbour >=2 ) state=1; else if (mystate==1 &&neighbour > 4) state=0; else if (mystate==0 && neighbour== 3) state=1; else if (mystate==0 && neighbour== 8) state=1;
if (mystate== 1 && neighbour < 2) state=0; else if (mystate==1 && neighbour < 4 && neighbour>=2 ) state=1; else if (mystate==0 &&neighbour >= 3 && neighbour <7) state=1; else if (mystate==0 && neighbour > 7) state=1; else if (mystate==1 && neighbour == 9) state=1;
if (mystate== 1 && neighbour < 2 || neighbour ==8) state=0; else if (mystate==0 && neighbour < 4 && neighbour>=2 ) state=1; else if (mystate==0 &&neighbour >= 3 && neighbour <6) state=1; else if (mystate==0 && neighbour > 6) state=1; else if (mystate==1 && neighbour == 9) state=1;
Cellular automata // Stacking
21
22
Cellular automata // Selective stacking In this stage we decided to apply Age limit, rule shifting and multiple states to gain more control over the system.
23
Simple selective stacking Fractal surfaces
Fractal connections
Age rule shifting
Fractal trees
24
Fractal trees
Manual input
Fractal trees
Cellular automata // Selective stacking
25
Cellular automata // Simple selective stacking // Fractal surfaces
26
Cellular automata // Simple selective stacking // Fractal surfaces
27
28
Cellular automata // Simple selective stacking // Fractal surfaces
29
30
Cellular automata // Simple selective stacking _Fractal connections
31
32
Cellular automata // Simple selective stacking _Manual imput
33
34
Cellular automata // Selective stacking Age rule shifting_Fractal connections
35
36
Cellular automata // Selective stacking Rule shifting according to living voxels_Fractal trees
37
Probability
38
Grid
Neighbourhood Addition Ca system
Grid
External ruletion Ca system
manual input
Image input
Time
Rules
0 1
Age
Time
State
probability map
1
0
State Image based Neighbours Rules
Stacking
Age based
Rule shifting
selective stacking
Age Limit Simple stacking Selective stacking
Display
Manual input
probability
<
<
< 39
rules
growing pulsation Through exploration of diffirent rules behevioral patterns, various methouds of initial state inputs and few controls logics we came up with directions we interested in. Ameba rule which keeps solid core and tends to grow throug pulsation prudeces outstanding pattern in a stacked model
elimination gliders blinking
input
control
all on/off image manual random resolution
rule shifting age limit population selective STACKING
40
Ameba rule discovery
41
Age limit
Surface forming by cells with less than 8 neighbors
8 8 8 8 8
8 8 8 8
8 8 8 8
8 8 8 8
8 8 8 8
8 8 8 8
Age limit was introduced as atempt to destibilize contsantly growing rools. CA cells witch stay without changes during certan simulatuon cycles eliminates.
Surface area forms by rules which could keep solid core. Due to this only cells having less than 8 neighbors stacks.
8 8 8
N
The second algotithm to form surface from solid-core rules. This method allows only recently borned cells be stacked.
N
N
N
N
N
N N N
Surface forming by new cells Both algorithms were combined to produce surface in finals models
N N
N
N N
42
This rule tends to grow and fills all grid size given. As an istrument to regulate growing areas of this rule a age limit elimitation was used. But amount of control it gives was not enought.
Control through age limit
43
data
representation
NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
2d data array
born rules
NULL NULL NULL NULL NULL
100% B
0% S
75 B
25 S
50 B
50 S
25 B
75 S
0%B
100% S
NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
filling each frame 0.0 - 1.0 0% - 100%
cleaning each frame val * 0.8 val < 0.3 = 0
0.0
0.2
0.3
0.4
0.5
0.2
0.3
0.4
0.5
0.6
0.3
0.4
0.5
0.6
0.7
0.4
0.5
0.6
0.7
0.8
0.5
0.6
0.7
0.9
1.0
0.0
0.16
0.24
0.32
0.4
0.16
0.24
0.32
0.4
0.48
0.24
0.32
0.4
0.48
0.56
0.32
0.4
0.48
0.56
0.64
0.4
0.48
0.56
0.72
0.8
Probability map was introduced as more intellegent way to limit growing area of rule inside of the array grid. Probability map - 2d array of data filled with numbers maped to 0.0-1.0 range. Each frame the map could be filled by external logic. In our case the simplest point movement inside of the grid was took as the filling logic.
ca rule
stay rules
CA rules were divided into two parts to be affected by probabiblty map. The first part, calling borning applies only on hight probability areas. Chance that this part would be applied vatiates from 0 to 100% each frame. If the borning part of rule didnâ&#x20AC;&#x2122;t apply the state part of rule applies.
44
Ipos
speed I = +2
power I = 1
speed I = +2
power I = 2
power J = 1
speed J = 1
Ipos
Jpos
speed J = 1
speed J = 0
Jpos
Through these five logics we were able to control the probability map and how it can create different effects using cellular automata. Position start, speed of movement, power effect on the array grid and how it reacts when it reachs the boundry of the grid.
Probability map logic
45
bouncing
bouncing full
These different effects where tested with careful documentation and rigor.
going through
pulsation
pulsation 2 direction
46
pulsation
1 point rotation
2 point rotation 47
masses 1
masses 2
masses 3 48
Length verses number of Edges (cantilevers)
49
50
51
texture 1
texture 2
texture 3 52
texture verses Richness
53
54
55
folds 1
folds 2
folds 3 56
57
58
59
60
Surface area vs most likable
61
62
63
64
Physical models
65
66
Physical models
67
68
69
70
71
72
73
74
75
76
77
78