Simple implementations of cellular automata for image processing and simulation