> ## Content Index
> Fetch the complete content index at: https://www.oransblog.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# cellular automata
- URL: https://www.oransblog.com/cellular-automata/
- Published: 2024-07-24T14:19:54.000Z
- Updated: 2026-10-29T05:57:41.000Z
- Description: i made a program for generating cellular automata
- Author: Oran C
- Tags: cellular automata, coding, programming, visualization, data visualization, #Import 2026-11-12 01:14

![](https://www.oransblog.com/content/images/2024/07/Pasted-image-20240723233842.png)

# I made a program that generates CA cellular automata. turns out its called wolfram

[Stephen Wolfram](https://en.wikipedia.org/wiki/Stephen%5FWolfram?ref=oransblog.com) studied this in the 80's.

[Elementary Cellular Automaton -- from Wolfram MathWorldThe simplest class of one-dimensional cellular automata. Elementary cellular automata have two possible values for each cell (0 or 1), and rules that depend only on nearest neighbor values. As a result, the evolution of an elementary cellular automaton can completely be described by a table specifyi…![](https://mathworld.wolfram.com/favicon.ico)from Wolfram MathWorld![](https://mathworld.wolfram.com/images/socialmedia/share.png)](https://mathworld.wolfram.com/ElementaryCellularAutomaton.html?ref=oransblog.com)

### the different patterns are just different repesentations of binary numbers from 0-255 (0000 0000 - 1111 1111)

Rule 30 is the most popular **(binary 00011110 = decimal 30)**

![](https://www.oransblog.com/content/images/2024/07/Pasted-image-20240723233551.png)

![](https://www.oransblog.com/content/images/2024/07/Pasted-image-20240723233234.png)

![](https://www.oransblog.com/content/images/2024/07/Pasted-image-20240723232123.png)

![](https://www.oransblog.com/content/images/2024/07/Pasted-image-20240723230408.png)

![](https://www.oransblog.com/content/images/2024/07/Pasted-image-20240723230115.png)

![](https://www.oransblog.com/content/images/2024/07/Pasted-image-20240723215615.png)

![](https://www.oransblog.com/content/images/2024/07/Pasted-image-20240723215833.png)

![](https://www.oransblog.com/content/images/2024/07/Pasted-image-20240723211414.png)

## the code

[GitHub - wisehackermonkey/celular-automataContribute to wisehackermonkey/celular-automata development by creating an account on GitHub.![](https://github.com/fluidicon.png)GitHubwisehackermonkey![](https://opengraph.githubassets.com/b54dc54474d777367c4a6c31375c67be28f57691eb8a56f743b1a92210ae4749/wisehackermonkey/celular-automata)](https://github.com/wisehackermonkey/celular-automata?ref=oransblog.com)

# the interesting bit

#### code is processing.org python mode

```python
def calc_grid():
    global current_row
    global rule
    if current_row < height - 1:
        next_row = [0] * width
        for i in range(width):
            if i == 0:
                next_row[i] = grid[current_row][i+1]
            elif i == width - 1:
                next_row[i] = grid[current_row][i-1]
            else:
                window = grid[current_row][i-1:i+2]
                if window == [1, 1, 1]:
                    next_row[i] = rule[0]
                    fill(0)
                elif window == [1, 1, 0]:
                    next_row[i] = rule[1]
                    fill(32)
                elif window == [1, 0, 1]:
                    next_row[i] = rule[2]
                    fill(64)
                elif window == [1, 0, 0]:
                    next_row[i] = rule[3]
                    fill(96)
                elif window == [0, 1, 1]:
                    next_row[i] = rule[4]
                    fill(160)
                elif window == [0, 1, 0]:
                    next_row[i] = rule[5]
                    fill(192)
                elif window == [0, 0, 1]:
                    next_row[i] = rule[6]
                    fill(224)
                elif window == [0, 0, 0]:
                    next_row[i] = rule[7]
                    fill(255)
        grid[current_row + 1] = next_row
        current_row += 1
        draw_grid()

```

# Note:

```python
rule = [0,0,0,1,1,1,1,0]
```

here's how the rules work

![](https://www.oransblog.com/content/images/2024/07/image-8.png)

/

## Thanks for reading!

![](https://www.oransblog.com/content/images/2021/12/oran.jpg)

# Author

![](https://www.oransblog.com/content/images/2023/08/morse_code_pattern.gif)

by o()r()a()n c()o()l()l()i()n()s

![](https://www.oransblog.com/content/images/2023/08/morse_code_pattern.gif)

  
github.com/wisehackermonkey  

![](https://www.oransblog.com/content/images/2021/12/image-16.png)

  
Discussions about modern kit design blends club tradition with fabric choices and technical details because shirts can show how clubs balance heritage and modern style. Modern ventilation panels allow a paragraph to connect practical choice with football identity. When personalised names and numbers matter, [football shirts](https://www.camisetatienda.com/?ref=oransblog.com) remains a natural topic when the focus is on design, fit, and supporter meaning. The wider kit culture adds context around collecting, gifting, and choosing a team shirt.

[](https://www.buymeacoffee.com/oran?ref=oransblog.com)