用turtle画一只坤坤
import turtle as t
import time
#t.bgpic("./2562.png")#这里是我下面p的那张无角色站台
t.tracer(1)
screen = t.Screen()
canvas = t.getcanvas()
p=t.Pen()
p.speed(5)
r=5
p.pensize(4)
def moveto(x,y):
p.penup()
p.goto(x,y)
p.pendown()
def Quan(c1,c2,r,w=360):
p.color(c1,c2)
p.begin_fill()
p.circle(r)
p.end_fill()
def lanqiu():
moveto(-135.00,-175.00)
Quan("black","chocolate",50)
moveto(-181.00,-125.00)
p.seth(350)
p.circle(355,16)
moveto(-180,-110)
p.seth(21)
p.circle(-145,20)
p.seth(0)
p.circle(-30,180)
p.circle(-145,20)
def head():
moveto(-5.16,-41.65)
p.seth(0)
Quan("black","#EFCB00",105)
moveto(-80.16,28.35)
p.pensize(2)
Quan("black","#E70700",20)
moveto(74.84,28.35)
Quan("black","#E70700",20)
moveto(-40.16,58.35)
Quan("black","#F0DDD6",35)
moveto(-45.16,98.35)
p.dot(25)
moveto(29.84,58.35)
Quan("black","#F0DDD6",35)
moveto(29.84,98.35)
p.dot(25)
p.color("#FD9D02")
p.begin_fill()
moveto(-49.84,48.35)
p.goto(-49.84,58.35)
p.goto(-5.16,78.35)
p.goto(35.16,58.35)
p.goto(35.16,48.35)
p.seth(250)
p.circle(-45,142)
p.goto(-49.84,48.35)
p.end_fill()
p.seth(353)
p.pensize(4)
p.color("#FA6C01")
p.circle(355,13)
def hair():
p.pensize(1)
moveto(-110.00,45.00)
p.color("#CABDB5")
p.begin_fill()
p.seth(100.0)
p.circle(-20,130)
p.seth(90.0)
p.circle(-110,52)
p.seth(333)
p.circle(-180,10)
p.circle(5,90)
p.seth(53)
p.circle(-60,33)
p.seth(325)
p.circle(-80,50)
p.seth(320.0)
p.circle(10,60)
p.goto(75.88,94.78)
p.goto(75.88,64.78)
p.seth(315.0)
p.circle(10,60)
p.goto(100.54,62.19)
p.goto(105.54,52.19)
p.circle(115,23)
p.seth(98.0)
p.circle(170,67)
p.seth(205.0)
p.circle(70,30)
p.seth(135.0)
p.circle(55,35)
p.seth(180.0)
p.circle(85,60)
p.seth(230.0)
p.circle(160,43)
p.goto(-110.00,45.00)
p.end_fill()
def lingzi():
moveto(-105.00,5.00)
p.color("#161010")
p.begin_fill()
p.seth(20.0)
p.circle(-135,43)
p.seth(347.0)
p.circle(150,40)
p.circle(-5,90)
p.seth(237.0)
p.circle(-130,108)
p.goto(-105.00,5.00)
p.end_fill()
def clothing():
p.color("#12100E")
p.begin_fill()
moveto(-90.00,-20.00)
p.goto(-85.00,-25.00)
p.seth(180.0)
p.circle(95,60)
p.seth(270.0)
p.circle(8,100)
p.seth(350)
p.circle(200,19)
p.seth(279)
p.circle(215,8)
p.seth(272)
p.circle(195,25)
p.goto(-68.98,-201.90)
p.goto(-73.98,-211.90)
p.seth(342)
p.circle(110,35)
p.goto(-7.83,-202.48)
p.goto(-12.83,-187.48)
p.seth(147)
p.circle(-25,290)
p.goto(15.83,-191.48)
p.goto(10.83,-201.48)
p.goto(10.83,-211.48)
p.seth(337)
p.circle(95,40)
p.seth(77)
p.circle(40,42)
p.seth(64)
p.circle(125,35)
p.seth(289)
p.circle(30,40)
p.circle(15,70)
p.seth(69)
p.circle(95,72)
p.seth(212)
p.circle(-165,65)
p.goto(-90.00,-20.00)
p.end_fill()
def necklace():
p.color("#E2D5C5")
p.pensize(8)
moveto(-68.00,-46.00)
p.seth(340)
p.circle(185,42)
moveto(-5.42,-58.69)
p.goto(-5.42,-68)
p.seth(0)
p.goto(-15.42,-68.00)
p.begin_fill()
for i in range(2):
p.forward(23)
p.right(90)
p.forward(26)
p.right(90)
p.end_fill()
def rompers():
p.pensize(18)
p.color("#EEE0D3")
moveto(-90.00,-25.00)
p.goto(-70.00,-105.00)
moveto(87.00,-25.00)
p.goto(83.00,-30.00)
p.goto(72.00,-100.00)
p.color("#BBB0AA")
p.begin_fill()
moveto(-79.81,-111.31)
p.pensize(5)
p.seth(350)
p.circle(455,21)
p.seth(286)
p.circle(-100,45)
p.seth(161)
p.circle(110,33)
p.goto(9.93,-173.18)
p.seth(124)
p.circle(10,90)
p.goto(-8.95,-185.48)
p.seth(154)
p.circle(75,50)
p.seth(109)
p.circle(-235,18.5)
p.goto(-79.81,-111.31)
p.end_fill()
lanqiu()
head()
hair()
lingzi()
clothing()
necklace()
rompers()
t.done()