2D-cellular-automaton


Name2D-cellular-automaton JSON
Version 0.0.1 PyPI version JSON
download
home_page
SummaryA package to visualize elementary 2D cellular automata with multiple starting indicies
upload_time2022-12-27 20:33:14
maintainer
docs_urlNone
author
requires_python>=3.7
licenseMIT License Copyright (c) 2022 Muhammad Mir Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords cellular automata cellular automaton
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://github.com/zmwangx/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](#Installation)
2. [Usage](#Usage)
4. [Credit](#Credit)
5. [License](License)

## Installation
`pip install 2DCellularAutomaton`

## Usage
```python
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

<img src="image.jpeg" alt="drawing" width="600"/>

## Credit
1. Zhiming Wang's [rule30](https://github.com/zmwangx/rule30)

## License 
MIT

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "2D-cellular-automaton",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "Cellular Automata,Cellular Automaton",
    "author": "",
    "author_email": "Muhammad Mir <mmir@drew.edu>",
    "download_url": "https://files.pythonhosted.org/packages/2f/cf/3652fe194d35c95b06b81b579c2a8055c2fc414bb02cb188dd55bf3fc381/2D-cellular-automaton-0.0.1.tar.gz",
    "platform": null,
    "description": "# 2D Cellular Automaton\n\nThis 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.\n\nI came across a respository on GitHub by Zhiming Wang titled [rule30](https://github.com/zmwangx/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.\n\n# Table of Contents\n1. [Installation](#Installation)\n2. [Usage](#Usage)\n4. [Credit](#Credit)\n5. [License](License)\n\n## Installation\n`pip install 2DCellularAutomaton`\n\n## Usage\n```python\nfrom CellularAutomaton import Automaton\n\nrows = 100 #Any positive number\nrule = 30 #From 1-256. More can be seen here https://mathworld.wolfram.com/ElementaryCellularAutomaton.html\nstarting_indicies = [20, 60] #Note this refers to the columns and columns = 2 * rows - 1, which is why rows - 1 yields center.\nblock_size = 1\n\nautomata = Automaton(rows=rows, rule=rule, starting_indicies=starting_indicies)\nimage = automata.image(block_size=block_size)\nimage.save('Rule 30 | Column 20 and 60.jpeg')\n```\n\nOutput\n\n<img src=\"image.jpeg\" alt=\"drawing\" width=\"600\"/>\n\n## Credit\n1. Zhiming Wang's [rule30](https://github.com/zmwangx/rule30)\n\n## License \nMIT\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2022 Muhammad Mir  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "A package to visualize elementary 2D cellular automata with multiple starting indicies",
    "version": "0.0.1",
    "split_keywords": [
        "cellular automata",
        "cellular automaton"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "96021b7fb5160fcc9be374bac7b9b789",
                "sha256": "1809a8680ae70346c600c533ebe10788d5bbd984199e7ba005d5336dc0fd4fd0"
            },
            "downloads": -1,
            "filename": "2D_cellular_automaton-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "96021b7fb5160fcc9be374bac7b9b789",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 7788,
            "upload_time": "2022-12-27T20:33:12",
            "upload_time_iso_8601": "2022-12-27T20:33:12.250074Z",
            "url": "https://files.pythonhosted.org/packages/df/e4/af998a0d18fdb137158ddf8bf9595b6e11092db319756cab519563833a19/2D_cellular_automaton-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "0300a286f3d015392dbe742f7e777dd9",
                "sha256": "5c3e908402bc0eb7964838fb8a113dae08220410d6853850978a4aa33c0be4fa"
            },
            "downloads": -1,
            "filename": "2D-cellular-automaton-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "0300a286f3d015392dbe742f7e777dd9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 7265,
            "upload_time": "2022-12-27T20:33:14",
            "upload_time_iso_8601": "2022-12-27T20:33:14.211545Z",
            "url": "https://files.pythonhosted.org/packages/2f/cf/3652fe194d35c95b06b81b579c2a8055c2fc414bb02cb188dd55bf3fc381/2D-cellular-automaton-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-27 20:33:14",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "2d-cellular-automaton"
}
        
Elapsed time: 0.02070s