您现在的位置是:课程教程文章

python图像怎么绘制

2023-12-18 18:00课程教程文章 人已围观

python蟒蛇绘制图像

计算机绘图是什么原理?

一段程序为何能够产生窗体?为何能在窗体上绘制图形?

python蟒蛇绘制从哪里开始呢?

如何绘制一条线?弧线?

代码实现

#PythonDraw.py
import turtle#引入一个绘图库
turtle.setup(650,350,200,200)
turtle.penup()
turtle.fd(-250)
turtle.pendown()
turtle.pensize(25)
turtle.pencolor("purple")
turtle.seth(-40)
for i in range(4):
    turtle.circle(40,80)
    turtle.circle(-40,80)
turtle.circle(40,80/2)
turtle.fd(40)
turtle.circle(16,180)
turtle.fd(40*2/3)
turtle.done()

运行结果

p1.jpg

如上就完成了Python简单图像的绘制。

更多Python知识,请关注:Python自学网!!

课程教程:python图像怎么绘制

上一篇:python为什么安装到c盘

下一篇:没有了

站点信息

  • 文章统计篇文章