Catalog PyPI
Back to packageRELEASE DETAILS

0.0.1

PyPI

2D-cellular-automaton

A package to visualize elementary 2D cellular automata with multiple starting indicies

automataautomatoncellular
Published27 Dec 2022
Direct dependencies2
Transitive dependenciesNot calculated

README

Version 0.0.1 documentation

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

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 2

Native requirements
2 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
bitarray
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.7",
  "evaluation": "NOT_EVALUATED"
}
bitarray (>=2.6.1)runtime
Pillow
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.7",
  "evaluation": "NOT_EVALUATED"
}
Pillowruntime

Distribution files

2 collected
2D_cellular_automaton-0.0.1-py3-none-any.whl

bdist_wheel · 7.61 KB · Python py3

Source file
2D-cellular-automaton-0.0.1.tar.gz

sdist · 7.09 KB · Python source

Source file

Repository

PENDING
muhammadmir/2d-cellular-automaton

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 15:24 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:ca78db2063aa2c1cddd66b787197f612173c75d3f6be2e3fb83b685bcad4f44d

Other collected versions

View all collected versions →