This project is a 3d celluar automata representation. A cellular automata is a collection of cells on a grid that can have some number of states, The cells evolve according to some rule set based on the states of neighboring cells. John Conway’s Game of Life is probably the most famous example of cellular automata.
In this case, instead of a grid, we’re working with a lattice. A grid of grids if you will. This is a relatively simple example in which a cell can either be alive or dead. If a cell is alive then it will be represented by a box, if a cell is dead then it will simply be invisible. The initial starting values can wildly affect results, this demo simply has several planes of cells as the default starting values.
There is a pause, reset, and speed slider There is also an input box to edit the rules. The first number is the number of live neighbors required for a cell to stay alive, and the second is the number of live neighbors required for a cell to be born, any other number of neighbors will cause the cell to die or not be born. You can control the location of the camera with the arrow keys and the direction it's looking with wasd keys.
This project was made using Babylon js and the Babylon mesh builder to create boxes for each cell.
Here is a link to the democode