python-海龟画图,画一只小乌龟

这是一个由海龟画图制作的小乌龟,但是没有上色,每一块地方都写了提示的

import turtle as t
t.speed(80)#这是控制画图的速度,如果觉得太快可以将数值减小
t.setup(800,800)
t.penup()
t.goto(100,-50)
t.down()
t.pensize(5)
t.seth(90)
t.circle(150,180)#龟壳曲线

t.penup()
t.goto(-200,-35)
t.down()
t.seth(-20)
t.circle(430,40)#下肚皮上层

t.penup()
t.goto(-200,-50)
t.down()
t.seth(-22)
t.circle(395,44)
t.end_fill()#下肚皮下层

t.penup()
t.goto(-200,-50)
t.down()
t.seth(-150)
t.circle(35,80)
t.seth(-35)
t.circle(30,80)
t.circle(55,30)#左脚

t.penup()
t.goto(60,-68)
t.down()
t.seth(-90)
t.circle(35,80)
t.seth(-20)
t.circle(20,60)
t.seth(80)
t.circle(90,30)#右脚

t.penup()
t.goto(104,-50)
t.down()
t.seth(-10)
t.circle(150,80)
t.seth(90)
t.circle(30,50)
t.seth(170)
t.circle(220,50)#头

t.penup()
t.goto(200,53)
t.down()
t.circle(28,360)#眼睛外框

t.fillcolor("black")
t.begin_fill()
t.penup()
t.goto(213,45)
t.down()
t.circle(14,360)
t.end_fill()#眼珠子

t.penup()
t.goto(-200,-35)
t.pendown()
t.seth(150)
t.fd(60)
t.seth(-70)
t.circle(75,50)#尾巴

t.penup()
t.goto(-188,10)
t.pendown()
t.seth(-10)
t.fd(70)
t.seth(-75)
t.fd(40)
t.seth(-120)
t.fd(20)#左下角龟壳

t.penup()
t.goto(-108,-40)
t.pendown()
t.seth(0)
t.fd(80)
t.seth(-60)
t.fd(20)#最下方龟壳

t.penup()
t.goto(-28,-40)
t.pendown()
t.seth(65)
t.fd(50)
t.seth(10)
t.fd(90)#右下角龟壳

t.penup()
t.goto(-6,5)
t.pendown()
t.seth(130)
t.fd(50)
t.seth(50)
t.fd(60)#右上角龟壳

t.penup()
t.goto(-38,43)
t.pendown()
t.seth(-180)
t.fd(50)
t.seth(130)
t.fd(50)#上龟壳

t.penup()
t.goto(-88,43)
t.pendown()
t.seth(-125)
t.fd(50)#左上龟壳

t.done()

你可能感兴趣的:(python)