LSystem
What is LSystem?
A pure python module for generating iterations from the L-System or Lindenmayer system. Please check the [Wikipedia page on L-system][https://en.wikipedia.org/wiki/L-system] for details.
The module gives you the LSystem class with the same structure as listed out on Wikipedia page (see the paragraph above). It gives you the following attributes:
- variables : A set of symbols that can be replaced
- constants : A set of symbols that won't be replaced
- axiom : The initial state of the system.
- rules : The rules for replacing variables with a combination of constants and variables.
- system : A list of iterations that have been formed. The first member is, naturally, the axiom. The list can be expanded using the
iterate()function member.
A quick tutorial
>>> from LindenmayerSystem import LSystem # Import the LSystem class from the LSystem module
>>> ################################################
>>> # Algae will be an instance of LSystem
>>> # with
>>> # variables being the list ['A', 'B']
>>> # no constants
>>> # axiom 'A'
>>> # rules A -> AB and B -> A
>>> ################################################
>>> Algae = LSystem(variables = "A B".split(), constants =[], axiom="A", rules={"A": "AB", "B":"A"})
>>> Algae
['A']
>>> Algae.variables
['A', 'B']
>>> Algae.constants
[]
>>> Algae.rules
{'A': 'AB', 'B': 'A'}
>>> Algae.axiom
'A'
>>> Algae
['A']
>>> Algae.iterate()
>>> Algae
['A', 'AB']
>>> Algae.iterate()
>>> Algae
['A', 'AB', 'ABA']
>>> Algae.system
['A', 'AB', 'ABA']
Invitation
to review
The code has been checked for the examples in Wikipedia. You are invited to cross check the results. Please raise an issue in case of a discrepancy.
to contribute
You are welcome to improve LSystem and suggest improvements.
Metadata
Release files for LindenmayerSystem 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| LindenmayerSystem-1.0.0.tar.gz | 2.6 kB | Without provenance | Details for LindenmayerSystem-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| LindenmayerSystem-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for LindenmayerSystem-1.0.0-py3-none-any.whl |
Total release size: 17.7 kB
Release files / LindenmayerSystem-1.0.0.tar.gz
| Download URL | LindenmayerSystem-1.0.0.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ad8def4dc5b14c0e7ed4c366755d5c54f1b600184c65a91d7fc5f1b78310090
|
|
BLAKE2b-256 checksum How to use checksums |
b251b7b65b25b94fa66bffe8e0e75120e1c601a48f63822ecad1e5e661e5c832
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5
|
Release files / LindenmayerSystem-1.0.0-py3-none-any.whl
| Download URL | LindenmayerSystem-1.0.0-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3b234977e9aaf27149fdae9baeb0f4e9519dddece68f7b158954f7f8bb34f131
|
|
BLAKE2b-256 checksum How to use checksums |
98cfee41dc3209911794d110d93d415705c0bb477a527808aa5085dc02294aa2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.22.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.5
|
Security for LindenmayerSystem 1.0.0
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.