3d cellular automaton