Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

How can I use the CellularAutomaton function to create a 2D automaton using a custom function and k colors?

I understood from this postthis post how to use custom rules for 1D automata.

I'm trying now to do that for 2D automata but I don't quite understand how CellularAutomaton is reacting to this.

I tried this to see what the general function gets:

CellularAutomaton[{Print[#] &, {}, {1, 1}}, {{{1}}, 0}, 1]

And I see that I get a matrix representing, I assume, the possible cases for rules

enter image description here

Compare this to the 1D case

enter image description here

But I still don't completely understand how to interpret this matrix and how to use more colors.

My final goal is to create this kind of cyclic automata using the CellularAutomaton function

Any kind of help would be useful. Thanks

How can I use the CellularAutomaton function to create a 2D automaton using a custom function and k colors?

I understood from this post how to use custom rules for 1D automata.

I'm trying now to do that for 2D automata but I don't quite understand how CellularAutomaton is reacting to this.

I tried this to see what the general function gets:

CellularAutomaton[{Print[#] &, {}, {1, 1}}, {{{1}}, 0}, 1]

And I see that I get a matrix representing, I assume, the possible cases for rules

enter image description here

Compare this to the 1D case

enter image description here

But I still don't completely understand how to interpret this matrix and how to use more colors.

My final goal is to create this kind of cyclic automata using the CellularAutomaton function

Any kind of help would be useful. Thanks

How can I use the CellularAutomaton function to create a 2D automaton using a custom function and k colors?

I understood from this post how to use custom rules for 1D automata.

I'm trying now to do that for 2D automata but I don't quite understand how CellularAutomaton is reacting to this.

I tried this to see what the general function gets:

CellularAutomaton[{Print[#] &, {}, {1, 1}}, {{{1}}, 0}, 1]

And I see that I get a matrix representing, I assume, the possible cases for rules

enter image description here

Compare this to the 1D case

enter image description here

But I still don't completely understand how to interpret this matrix and how to use more colors.

My final goal is to create this kind of cyclic automata using the CellularAutomaton function

Any kind of help would be useful. Thanks

Source Link
xtian777x
  • 1k
  • 8
  • 15

Custom Cellular Automata rule with k colors

How can I use the CellularAutomaton function to create a 2D automaton using a custom function and k colors?

I understood from this post how to use custom rules for 1D automata.

I'm trying now to do that for 2D automata but I don't quite understand how CellularAutomaton is reacting to this.

I tried this to see what the general function gets:

CellularAutomaton[{Print[#] &, {}, {1, 1}}, {{{1}}, 0}, 1]

And I see that I get a matrix representing, I assume, the possible cases for rules

enter image description here

Compare this to the 1D case

enter image description here

But I still don't completely understand how to interpret this matrix and how to use more colors.

My final goal is to create this kind of cyclic automata using the CellularAutomaton function

Any kind of help would be useful. Thanks