Functions to create an initial configuration :
Fonction | Details |
---|---|
Set(x,y,c) | set the cell (x,y) at state c |
Line(y,c) | Trace a line of cell c at column y |
Column(x,c) | Trace a column of cell c at line x |
Bernoulli(proba,c,d) | Create a Bernoulli configuration, with probability proba of cells c and (1-proba) of cells d |
Rectangle(x,y,width,height,c) | Create a rectangle of cells c at x,y with dimensions (width, height) |
Frame(x,y,width,height,c) | Create an empty rectangle of cells c at x,y with dimensions (width, height) |
Check(x,y,width,height,c,d) | Create a checkerboard of cells c and d on all the grid |
SmallCheck(x,y,width,height,c,d) | Create a checkerboard of cells c and d at x,y of dimensions (width, height) |
Details on the arguments :
Argument | Type | Details |
---|---|---|
x | int | Precise localisation of the figure on the X-axis |
y | int | Precise localisation of the figure on the Y-axis |
width | int | Precise the size of the figure on the X-axis |
height | int | Precise the size of the figure on the Y-axis |
c | char | Precise type of cell. If not precised, set to '1'. |
d | char | Precise type of cell. If not precised, set to '0'. |
proba | double | Precise the probability used in this function |
Example on the StarWars model, with a 64x64 grid :
Rectangle(7,40,10,15)+SmallCheck(10,30,20,20,2)|(Frame(35,40,10,35,3)+Line(9,2)+Column(20))+Set(3,2,3)+Bernoulli(0.75,2,1)