python零基础 turtle库绘制《小猪佩奇》里的小恐龙
python代码
#dinosaur.py
import turtle as t
#龙身
t.setup(1000,600) # 设置画布的大小
t.speed(10) # 设置画笔速度为10
t.pensize(5) # 设置画笔大小
t.pencolor("SpringGreen4") # 设置画笔颜色
t.penup() # 提笔
t.goto(250,180) # 画笔前往坐标(250,180)
t.begin_fill() # 准备填充
t.pendown() # 落笔
t.seth(120) # 画笔角度为120°
t.circle(100,140) # 画一个半径为100,角度为140°的圆
t.seth(-96)
t.fd(120) # 向前移动120
t.circle(-100,50)
t.circle(-80,23)
t.seth(176)
t.fd(20)
t.seth(180)
t.circle(-315,40)
t.seth(270)
t.circle(50,30)
t.circle(10,3)
t.seth(-60)
t.circle(180,40)
t.circle(500,20)
t.circle(750,8)
t.circle(80,60)
t.circle(70,30)
t.fd(90)
t.circle(-80,30)
t.seth(10)
t.fd(60)
t.seth(160)
t.fd(90)
t.seth(22)
t.fd(89)
t.color("LightGreen") # 设置填充颜色
#t.color('SpringGreen1')
t.end_fill() # 依据轮廓填充
#龙眼
t.pensize(5)
t.pencolor("SpringGreen4")
t.penup()
t.goto(128,165)
t.pendown()
t.begin_fill()
t.seth(