Skip to main content

2D Cellular Automaton

This project was inspired by discussions in MATH 340 Mathematical Excursions. While we visualized multiple starting indicies for 2D cellular automata in Excel, I knew a Python script would allow greater functioniality and easier usage.

I came across a respository on GitHub by Zhiming Wang titled rule30. Nearly all the code is borrowed from there and made it unnecessary for me to start from scratch. All the functionalities from Wang's solution exist in this project, with the only additions being supporting multiple starting indicies.

Table of Contents

  1. Installation
  2. Usage
  3. Credit
  4. License

Installation

pip install 2DCellularAutomaton

Usage

from CellularAutomaton import Automaton

rows = 100 #Any positive number
rule = 30 #From 1-256. More can be seen here https://mathworld.wolfram.com/ElementaryCellularAutomaton.html
starting_indicies = [20, 60] #Note this refers to the columns and columns = 2 * rows - 1, which is why rows - 1 yields center.
block_size = 1

automata = Automaton(rows=rows, rule=rule, starting_indicies=starting_indicies)
image = automata.image(block_size=block_size)
image.save('Rule 30 | Column 20 and 60.jpeg')

Output

drawing

Credit

  1. Zhiming Wang's rule30

License

MIT

Metadata

Release files for 2D-cellular-automaton 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for 2D-cellular-automaton 0.0.1
File Size Uploaded Provenance
2D-cellular-automaton-0.0.1.tar.gz 7.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for 2D-cellular-automaton 0.0.1
File Interpreter ABI Platform
2D_cellular_automaton-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 15.1 kB

Release files / 2D-cellular-automaton-0.0.1.tar.gz

Download URL 2D-cellular-automaton-0.0.1.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5c3e908402bc0eb7964838fb8a113dae08220410d6853850978a4aa33c0be4fa
BLAKE2b-256 checksum
How to use checksums
2fcf3652fe194d35c95b06b81b579c2a8055c2fc414bb02cb188dd55bf3fc381
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.9

Release files / 2D_cellular_automaton-0.0.1-py3-none-any.whl

Download URL 2D_cellular_automaton-0.0.1-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1809a8680ae70346c600c533ebe10788d5bbd984199e7ba005d5336dc0fd4fd0
BLAKE2b-256 checksum
How to use checksums
dfe4af998a0d18fdb137158ddf8bf9595b6e11092db319756cab519563833a19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.9

Security for 2D-cellular-automaton 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page