Python package, which you can use to generate and drawing trees, realistic or fractal ones.
Usage
$ pip install Tree
from math import pi, radians as rad
from Tree.core import Tree
from PIL import Image
branches = (
(.5, rad(-30)),
(.6, rad(30)),
(.4, rad(60))
)
def main():
tree = Tree(
pos=(0, 0, 0, -500),
branches=branches
)
# Let the tree grow
tree.grow(10)
# Move the tree in the right position, so that the tree is completly in the image
tree.move_in_rectangle()
im = Image.new("RGB", tree.get_size(), (239, 239, 239))
tree.draw_on(im, (85, 25, 0, 128, 53, 21), (0, 62, 21), 10)
im.show()
if __name__ == '__main__':
main()
Documentation
The documentation is hosted on Readthedocs.
Metadata
Release files for Tree 0.2.4
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 |
|---|---|---|---|---|
| Tree-0.2.4.tar.gz | 6.5 kB | Without provenance | Details for Tree-0.2.4.tar.gz |
Release files / Tree-0.2.4.tar.gz
| Download URL | Tree-0.2.4.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f84d8ec9bf50dd69f551da78925a23d110864e7706551f590cdade27646f7883
|
|
BLAKE2b-256 checksum How to use checksums |
293f63cbed2909786f0e5ac30a4ae5791ad597c6b5fec7167e161c55bba511ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for Tree 0.2.4
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.