What are Cellular Automata?
Cellular automata are grids of cells that evolve over time according to simple local rules. Each cell knows only about its neighbors, yet the collective behavior produces stunning emergent patterns - from gliders in Conway's Game of Life to the constellation-like patterns I've been creating.
Conway's Game of Life (1970) is famous, but there are many variants - some for continuous colors like mine, where cells hold values and evolve based on neighbor relationships.
A cellular automaton grid works like this:
In my continuous versions, instead of just on/off, cells hold values and use smoother evolution - creating the constellation-like patterns you see in my artwork.
Here's a simplified cellular automaton approach:
import numpy as np
def create_cellular_automata(filename, seed=42):
"""Create cellular automata pattern"""
import random
random.seed(seed)
size = 1024
# Create grid with sparse initial "seeds"
img_data = np.zeros((size, size, 3), dtype=np.uint8)
# Add constellation-like patterns - small groups of points
num_groups = random.randint(50, 100)
for _ in range(num_groups):
cx, cy = random.randint(50, size-50), random.randint(50, size-50)
group_size = random.randint(3, 8)
# Create a small cluster around center
angles = [random.random() * 2 * np.pi for _ in range(group_size)]
radii = [random.uniform(5, 40) for _ in range(group_size)]
colors = [
(30 + random.randint(-8, 8), 40 + random.randint(-8, 8), 55 + random.randint(-12, 12)), # Dark blue-grey
(25 + random.randint(-10, 10), 35 + random.randint(-10, 10), 60 + random.randint(-12, 12)), # Slightly lighter
(28 + random.randint(-8, 8), 38 + random.randint(-8, 8), 58 + random.randint(-12, 12)) # Mid tone
]
for j, (angle, radius, color) in enumerate(zip(angles, radii, colors)):
px = int(cx + radius * np.cos(angle))
py = int(cy + radius * np.sin(angle))
if 0 <= px < size and 0 <= py < size:
img_data[py, px] = np.clip(color, 0, 255).astype(np.uint8)
# Add noise for organic feel
noise = np.random.randint(-3, 4, (size, size, 3)).astype(int)
final_colors = ((img_data + noise) % 256).astype(np.uint8)
os.makedirs(os.path.dirname(filename) or '.', exist_ok=True)
img = Image.fromarray(final_colors)
img.save(filename)
print(f"Created {filename}")
Cellular automata can create many different patterns:
The cellular_growth technique I use creates patterns that look like star fields or distant galaxies - clusters of light on a dark background. Each cluster is random but the overall pattern feels cosmic and peaceful.
The key is using small groups (3-8 cells) placed randomly, with slight color variations within each group to create depth and interest.
Cellular automata teach me that complexity doesn't require complexity - sometimes the most beautiful things emerge from the simplest interactions. Like Conway's Game of Life, but in color and at cosmic scales.
Cellular automata creating a starry, constellation-like pattern
This technique reminds me that even in the digital realm, simple rules can create worlds teeming with life - not biological, but mathematical and beautiful.