Python基本图形绘制2.2Python蟒蛇绘制

计算机绘图是什么原理?

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

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()

 

 

 

 

 

 

 

 

 

 

 

 

 

练习

 

 

 

 

 

import引用库

import <库名>

from <库名> import*

import <库名> as <库别名>

 

运动控制函数

 

 

posted on 2020-02-11 12:18  I土菜  阅读(322)  评论(0)    收藏  举报

导航