Skip to main content

A package for creating and drawing trees

Project description

Python package, which you can use to generate and drawing trees, realistic or fractal ones.


$ 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),

    # Let the tree grow

    # Move the tree in the right position, so that the tree is completly in the image

    im ="RGB", tree.get_size(), (239, 239, 239))
    tree.draw_on(im, (85, 25, 0, 128, 53, 21), (0, 62, 21), 10)

if __name__ == '__main__':


The documentation is hosted on Readthedocs.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for Tree, version 0.2.4
Filename, size File type Python version Upload date Hashes
Filename, size Tree-0.2.4.tar.gz (6.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page