创建和绘制树的包

Tree的Python项目详细描述


https://img.shields.io/pypi/v/tree.svg?style=flat-squarehttps://img.shields.io/pypi/l/Tree.svg?style=flat-square

python包,可用于生成和绘制树、真实树或分形树。

用法

$ pip install Tree
frommathimportpi,radiansasradfromTree.coreimportTreefromPILimportImagebranches=((.5,rad(-30)),(.6,rad(30)),(.4,rad(60)))defmain():tree=Tree(pos=(0,0,0,-500),branches=branches)# Let the tree growtree.grow(10)# Move the tree in the right position, so that the tree is completly in the imagetree.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()
https://raw.githubusercontent.com/PixelwarStudio/PyTree/master/images/example.png

文档

文档位于Readthedocs上。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java确保我正确地解决了这个问题   对于Java接口中的常量,“publicstaticfinal”是多余的吗?   为什么是java。网SocketException:socket在java之后关闭。网ConnectException:连接被拒绝'?   安卓在Java中将JSON转换为多维数组的最佳方式是什么?   java如何为gradle构建使用lint4j插件,以及如何为Jenkins配置它?   JavaMaven:一个项目如何能够从一个二级依赖引用一个类   使用java的excel Linest函数   java如何完全禁用JTextPane的文本突出显示?   java jBoss概要如何?   java Pi4J类路径错误Intellij在Pi Zero W上远程运行   java如何根据特定条件在JPA/Play中使用EntityManager进行批量更新?   java如何在EJB调度中设置计时器值?   javasocket服务器没有连接   java如何在日期解析后以yyyyMMdd格式获取日期对象   java客户端python服务器发送udp数据   使用ArrayList从java文件中读取文本   框架上的java Selenium测试   java setOnClickListener匿名类?