小编Tim*_*Rin的帖子

在Python中将乌龟绘制的图像转换为PNG

我在Python中制作一个抽象艺术模板生成器,它接受最小半径,最大半径和圆圈数的输入.它在随机位置绘制随机圆圈,也符合用户的规格.我想将Turtle图形转换为PNG,以便用户可以编辑模板但是他/她想要,但我不知道如何继续.这是我的代码:

import random  
import time  
import turtle  

print("Abstract Art Template Generator")
print()
print("This program will generate randomly placed and sized circles on a blank screen.")
num = int(input("Please specify how many circles you would like to be drawn: "))
radiusMin = int(input("Please specify the minimum radius you would like to have: "))
radiusMax = int(input("Please specify the maximum radius you would like to have: "))
screenholder = input("Press ENTER when you are ready to see your circles drawn: ")

t …
Run Code Online (Sandbox Code Playgroud)

python turtle-graphics

6
推荐指数
2
解决办法
4276
查看次数

标签 统计

python ×1

turtle-graphics ×1