python运用turtle库画图--关于疫情主题的图片

初学python中的turtle库,个人认为画图前要先建立好直角坐标系,确定好各主要点的坐标,这样提笔的时候更加容易画出准确的图。
使用turtle库画出了这样一张关于疫情主题的图片,寄托我们美好的祝愿。
在这里插入图片描述
代码如下:

import turtle as t
import random

def wheregoto(x,y): #x,y表示坐标
    t.up()
    t.goto(x,y)
    t.down()

t.speed(0)
t.pensize(4)
t.screensize(690,764) #设置画布
t.pensize(4)
wheregoto(-325,352)
t.setheading(270)
t.pencolor("gray1")
for j in range (2):
    t.forward(734)
    t.left(90)
    t.forward(650)
    t.left(90)
t.pencolor("red3")
t.penup()

#枕头
t.speed(0)
t.fillcolor("mint cream")
t.setheading(180)
wheregoto(-86,-22)
t.begin_fill()
t.pendown()
t.left(-10)
t.circle(160,12)
t.left(-41)
t.circle(60,10)
t.left(70)
t.circle(60,10)
t.left(40)
t.circle(200,8)
t.left(-8)
t.circle(200,4)
t.left(-18)
t.circle(200,4)
t.right(10)
t.circle(200,4)
t.left(10)
t.circle(200,4)
t.left(10)
t.circle(200,4)
t.left(10)
t.circle(200,3)
t.right(15)
t.circle(200,3)
t.right(25)
t.circle(200,3)
t.left(55)
t.circle(200,3)
t.left(25)
t.circle(200,14)
t.fd(150)
t.setheading(-5)
t.pendown()
t.circle(200,8)
t.right(40)
t.circle(200,2)
t.left(30)
t.circle(200,3)
t.left(20)
t.circle(200,2)
t.left(45)
t.circle(70,40)
t.right(30)
t.circle(200,17)
t.right(20)
t.circle(200,3)
t.left(10)
t.circle(200,3)
t.left(20)
t.circle(200,3)
t.left(20)
t.circle(60,3)
t.left(60)
t.circle(60,5)
t.left(20)
t.circle(60,5)
t.right(50)
t.circle(300,9)
t.seth(176)
t.fd(168)
t.end_fill()

#杯子
t.setheading(0)
wheregoto(-100,90)
t.fillcolor("floral white")
t.begin_fill()
t.left(-80)
t.forward(160)
t.left(30)
t.circle(100,95)
t.left(35)
t.forward(163)
t.end_fill()
t.fillcolor("khaki1")
t.begin_fill()
t.left(57)
t.circle(150,85)
t.left(103)
t.circle(180,68)
t.end_fill()

#面
#面底色
wheregoto(-86,81)
t.pencolor("red3")
t.fillcolor("khaki")
t.begin_fill()
t.setheading(56)
t.circle(-103,114)
t.pensize(2)
t.setheading(212)
t.circle(-154,70)
t.end_fill()

#大面
wheregoto(-76,78)
t.pencolor("Darkgoldenrod3")
t.setheading(36)
t.pensize(4)
t.circle(-140,70)
wheregoto(-76,90)#面条1
t.pencolor("Darkgoldenrod3")
t.setheading(30)
t.pensize(4)
t.circle(-160,50)
wheregoto(-54,110)#2
t.pencolor("Darkgoldenrod3")
t.setheading(18)
t.pensize(4)
t.circle(-150,50)
wheregoto(-36,115)#3
t.pencolor("Darkgoldenrod3")
t.setheading(19)
t.pensize(4)
t.circle(-90,60)
wheregoto(-36,115)#4
t.pencolor("Darkgoldenrod3")
t.setheading(24)
t.pensize(4)
t.circle(-90,60)
wheregoto(-66,75)#5
t.pencolor("Darkgoldenrod3")
t.setheading(41)
t.circle(-90,90)
wheregoto(-10,103)#6
t.pencolor("Darkgoldenrod3")
t.setheading(0)
t.circle(-110,47)
wheregoto(-10,103)#7
t.pencolor("Darkgoldenrod3")
t.setheading(0)
t.circle(-150,37)

#小面
t.pensize(5)
t.pencolor("red3")
wheregoto(-63,71)
t.setheading(39)
t.circle(-110,30)
t.setheading(10)
t.circle(-56,76)
wheregoto(-63,71)#面条1
t.pencolor("Darkgoldenrod3")
t.setheading(34)
t.circle(-110,30)
t.setheading(10)
t.circle(-56,72)
wheregoto(-54,67)#2
t.pencolor("Darkgoldenrod3")
t.setheading(30)
t.circle(-130,24)
t.setheading(6)
t.circle(-56,61)
wheregoto(-42,63)#3
t.pencolor("Darkgoldenrod3")
t.setheading(30)
t.circle(-130,20)
t.setheading(6)
t.circle(-56,52)
wheregoto(-28,60)#4
t.pencolor("Darkgoldenrod3")
t.setheading(30)
t.circle(-130,16)
t.setheading(6)
t.circle(-56,48)
wheregoto(-15,56)#5
t.pencolor("Darkgoldenrod3")
t.setheading(32)
t.circle(-130,14)
t.setheading(6)
t.circle(-40,48)
wheregoto(-1,56)#6
t.pencolor("Darkgoldenrod3")
t.setheading(34)
t.circle(-120,9)
t.setheading(6)
t.circle(-30,48)
wheregoto(13,56)#7
t.pencolor("Darkgoldenrod3")
t.setheading(30)
t.circle(-120,9)
t.setheading(6)
t.circle(-10,60)

#面轮廓
wheregoto(-86,81)
t.pencolor("red3")
t.setheading(56)
t.circle(-103,114)
t.pensize(4)
t.setheading(212)
t.circle(-154,70)

#酱汁
wheregoto(-34,110)
t.pensize(3)
t.pendown()
t.pencolor("orange4")
t.fillcolor("orange4")
t.begin_fill()
t.setheading(56)
t.circle(-40,50)
t.setheading(26)
t.circle(-40,70)
t.setheading(-15)
t.circle(-70,30)
t.circle(-30,30)
t.circle(-10,30)
t.circle(-10,100)
t.circle(-190,10)
t.circle(-5,360)
t.seth(-170)
t.circle(-180,20)
t.seth(145)
t.circle(-30,50)
t.end_fill()
t.penup()

wheregoto(55,75)
t.begin_fill()
t.circle(3,360)
t.end_fill()

wheregoto(40,90)
t.begin_fill()
t.circle(5,360)
t.end_fill()

wheregoto(-45,95)
t.begin_fill()
t.circle(2,360)
t.end_fill()

#葱
t.pencolor("lawn green")
t.fillcolor("lawn green")
wheregoto(0,110)
t.begin_fill()
t.circle(3,360,4)
t.end_fill()

t.pencolor("lawn green")
t.fillcolor("lawn green")
wheregoto(35,65)
t.begin_fill()
t.circle(2,360,4)
t.end_fill()

t.pencolor("DarkOliveGreen1")
t.fillcolor("DarkOliveGreen1")
wheregoto(45,90)
t.begin_fill()
t.circle(2,360,5)
t.end_fill()

t.pencolor("lawn green")
t.fillcolor("lawn green")
wheregoto(10,70)
t.begin_fill()
t.circle(2,360,5)
t.end_fill()

t.pencolor("DarkOliveGreen1")
t.fillcolor("DarkOliveGreen1")
wheregoto(-30,90)
t.begin_fill()
t.circle(3,360,5)
t.end_fill()

t.pencolor("lawn green")
t.fillcolor("lawn green")
wheregoto(-15,85)
t.begin_fill()
t.circle(2,360,4)
t.end_fill()

t.pencolor("lawn green")
t.fillcolor("lawn green")
wheregoto(15,80)
t.begin_fill()
t.circle(2,360,4)
t.end_fill()

t.pencolor("DarkOliveGreen1")
t.fillcolor("DarkOliveGreen1")
wheregoto(-35,70)
t.begin_fill()
t.circle(2,360,4)
t.end_fill()

t.pencolor("DarkOliveGreen1")
t.fillcolor("DarkOliveGreen1")
wheregoto(25,95)
t.begin_fill()
t.circle(3,360,4)
t.end_fill()

t.pencolor("DarkOliveGreen1")
t.fillcolor("DarkOliveGreen1")
wheregoto(70,85)
t.begin_fill()
t.circle(2,360,4)
t.end_fill()

t.pencolor("DarkOliveGreen1")
t.fillcolor("DarkOliveGreen1")
wheregoto(30,120)
t.begin_fill()
t.circle(3,360,4)
t.end_fill()

#辣椒
t.pensize(3)
t.pencolor("OrangeRed2")
t.fillcolor("OrangeRed2")
wheregoto(-15,120)
t.begin_fill()
t.circle(3,360,4)
t.end_fill()

wheregoto(19,78)
t.pensize(2)
t.pencolor("OrangeRed2")
t.fillcolor("OrangeRed2")
t.pendown()
t.begin_fill()
t.circle(-4,260)
t.end_fill()

wheregoto(20,80)
t.pensize(1)
t.pencolor("Salmon")
t.fillcolor("Salmon")
t.begin_fill()
t.seth(23)
t.circle(-3,360,4)
t.end_fill()

t.pensize(3)
t.pencolor("OrangeRed2")
t.fillcolor("OrangeRed2")
wheregoto(-15,85)
t.begin_fill()
t.circle(3,360,4)
t.end_fill()

wheregoto(55,100)
t.pensize(1)
t.pencolor("Salmon")
t.fillcolor("Salmon")
t.begin_fill()
t.seth(23)
t.circle(-3,360,4)
t.end_fill()

t.pensize(3)
t.pencolor("OrangeRed2")
t.fillcolor("OrangeRed2")
wheregoto(15,113)
t.begin_fill()
t.circle(5,360)
t.end_fill()

wheregoto(15,115)
t.pensize(1)
t.pencolor("Salmon")
t.fillcolor("Salmon")
t.begin_fill()
t.seth(23)
t.circle(3,360,4)
t.end_fill()

t.pensize(3)
t.pencolor("OrangeRed2")
t.fillcolor("OrangeRed2")
wheregoto(5,93)
t.begin_fill()
t.circle(3,360,6)
t.end_fill()

t.pencolor("OrangeRed2")
t.fillcolor("OrangeRed2")
wheregoto(38,99)
t.begin_fill()
t.circle(3,360,4)
t.end_fill()

t.pencolor("OrangeRed2")
t.fillcolor("OrangeRed2")
wheregoto(25,105)
t.begin_fill()
t.circle(3,360,4)
t.end_fill()

wheregoto(-10,70)
t.pensize(1)
t.pencolor("Salmon")
t.fillcolor("Salmon")
t.begin_fill()
t.seth(23)
t.circle(4,360,4)
t.end_fill()

wheregoto(32,105)
t.pensize(1)
t.pencolor("Salmon")
t.fillcolor("Salmon")
t.begin_fill()
t.seth(23)
t.circle(3,360)
t.end_fill()

#眼睛
t.speed(0)
t.pensize(1)
t.setheading(180)
t.fillcolor("red3")
t.begin_fill()
wheregoto(-25,37)
len = 0.12
for k in range(2):
    for j in range(60):
        if j < 30:
            len += 0.024
        else:
            len -= 0.024
        t.forward(len)
        t.left(3)
t.end_fill()
wheregoto(-28,31)
t.pencolor("snow")
t.fillcolor("snow")
t.begin_fill()
len = 0.05
for k in range(2):
    for j in range(60):
        if j < 30:
            len += 0.01
        else:
            len -= 0.01
        t.forward(len)
        t.left(3)
wheregoto(-24,22)
t.circle(2,360)
t.end_fill()

t.pencolor("red3")
t.fillcolor("red3")
t.begin_fill()
wheregoto(23,37)
len = 0.12
for k in range(2):
    for j in range(60):
        if j < 30:
            len += 0.024
        else:
            len -= 0.024
        t.forward(len)
        t.left(3)
t.end_fill()
wheregoto(20,31)
t.pencolor("snow")
t.fillcolor("snow")
t.begin_fill()
len = 0.05
for k in range(2):
    for j in range(60):
        if j < 30:
            len += 0.01
        else:
            len -= 0.01
        t.forward(len)
        t.left(3)
wheregoto(24,22)
t.circle(2,360)
t.end_fill()

#腮红
t.pensize(4)
t.pencolor("salmon1")
t.fillcolor("salmon1")
t.begin_fill()
wheregoto(-40,13)
t.setheading(90)
len = 0.16
for k in range(2):
    for j in range(60):
        if j < 30:
            len += 0.032
        else:
            len -= 0.032
        t.forward(len)
        t.left(3)
t.end_fill()
t.begin_fill()
wheregoto(62,14)
t.setheading(90)
len = 0.16
for k in range(2):
    for j in range(60):
        if j < 30:
            len += 0.032
        else:
            len -= 0.032
        t.forward(len)
        t.left(3)
t.end_fill()

t.pensize(2)
t.pencolor("red3")
wheregoto(-65,16)
t.setheading(0)
t.right(55)
t.forward(10)
wheregoto(-56,19)
t.forward(11)
wheregoto(-48,19)
t.forward(10)

wheregoto(37,17)
t.forward(10)
wheregoto(44,19)
t.forward(11)
wheregoto(53,18)
t.forward(10)

#口罩
t.pensize(4)
t.setheading(0)
wheregoto(-87,16)
t.left(-42)
t.circle(100,21)
t.fillcolor("LightBlue1")
t.begin_fill()
t.left(-80)
t.circle(100,39)
t.left(30)
t.circle(95,56)
t.left(35)
t.circle(100,43)
t.left(50)
t.circle(120,55)
t.end_fill()

t.setheading(0)
wheregoto(-71,-66)
t.left(-2)
t.circle(100,13)
wheregoto(86,11)
t.left(180)
t.circle(100,19)

wheregoto(74,-72)
t.right(40)
t.circle(100,16)

#衣服
t.fillcolor("alice blue")
t.pensize(4)
t.setheading(0)
wheregoto(78,-193)
t.begin_fill()
t.left(90)
t.circle(150,31)
t.left(28)
t.circle(750,2)
t.left(75)       #领子
t.circle(100,20)
t.right(120)
t.circle(100,13)
t.left(80)
t.circle(100,13)
t.right(130)
t.circle(105,20)
t.left(75)
t.circle(720,2)
t.left(40)
t.circle(150,34)
t.seth(7)
t.circle(-480,18)
t.end_fill()

wheregoto(-43,-140)
t.right(90)
t.circle(180,13)
wheregoto(5,-140)
t.right(10)
t.circle(180,16)
wheregoto(53,-150)
t.right(10)
t.circle(170,14)

wheregoto(-40,-155)
t.setheading(0)
t.right(80)
t.forward(5)
wheregoto(-34,-155)
t.setheading(0)
t.right(80)
t.forward(5)

wheregoto(-31,-99)
t.setheading(0)
t.right(35)
t.circle(100,20)
t.left(27)
t.circle(100,20)

#被子
t.setheading(0)
wheregoto(160,-245)
t.left(100)
t.circle(100,25)
t.left(45)
t.circle(1000,15)
t.left(10)
t.circle(20,30)
t.right(90)
t.circle(20,30)
t.setheading(180)
t.circle(10,60)
t.circle(130,21)

wheregoto(-110,-200)
t.setheading(0)
t.right(150)
t.forward(25)
wheregoto(-90,-200)
t.setheading(0)
t.right(150)
t.forward(25)

wheregoto(-76,-189)
t.pensize(2)
t.seth(5)
t.circle(-480,18)
t.seth(-6)
t.fd(45)

#黑龙江
#大米
t.pensize(4)
t.speed(0)
wheregoto(-265,190)
t.seth(-80)
t.fillcolor("lemon chiffon")
t.begin_fill()
t.fd(60)
wheregoto(-256,140)
t.seth(-88)
t.fd(50)
wheregoto(-265,190)#上横1
t.seth(15)
t.fd(60)
wheregoto(-205,206)#上横2
t.seth(0)
t.fd(59)
wheregoto(-147,206)#右竖1
t.seth(-82)
t.fd(60)
wheregoto(-140,163)#右竖2
t.seth(-87)
t.fd(110)
wheregoto(-134,50)#下横
t.seth(-178)
t.fd(110)
t.end_fill()
t.penup()

#右手
wheregoto(-324,90)#右手手臂第一条线
t.seth(-5)
t.fillcolor("seashell")
t.begin_fill()
t.fd(60)
wheregoto(-264,86)#右手拇指第一条线
t.seth(15)
t.fd(40)
wheregoto(-224,93)#右手拇指第二条线
t.seth(-120)
t.fd(20)
wheregoto(-234,75)#右手食指
t.seth(-11)
t.fd(48)
wheregoto(-187,65)#右手食指第二条线
t.seth(-170)
t.fd(22)
wheregoto(-207,60)#右手中指第1条线
t.seth(-8)
t.fd(18)
wheregoto(-190,55)#右手中指第2条线
t.seth(-172)
t.fd(16)
wheregoto(-207,51)#右手小指第1条线
t.seth(-8)
t.fd(16)
wheregoto(-190,46)#右手小指第2条线
t.seth(-172)
t.fd(48)
wheregoto(-234,39.5)#右手手臂
t.seth(172)
t.fd(90)
t.end_fill()

#左手手臂
wheregoto(-324,90)#右手手臂第一条线
t.seth(-5)
t.fillcolor("seashell")
t.begin_fill()
t.fd(60)
t.seth(15)
t.fd(8)
t.left(74)
t.fd(27)
t.end_fill()
t.begin_fill()
wheregoto(-324,90)
wheregoto(-324,120)
t.seth(-5)
t.fd(70)
t.end_fill()

#"米"
t.pensize(5)
wheregoto(-218,154)#捺点
t.seth(-46)
t.fd(20)
t.pensize(5)
wheregoto(-190,163)#撇点
t.seth(-108)
t.fd(20)
t.pensize(6)
wheregoto(-215,130)#横
t.seth(16)
t.fd(35)
t.pensize(6)
wheregoto(-208,165)#竖
t.seth(-64)
t.circle(-140,28)
t.pensize(6)
wheregoto(-200,130)#撇
t.seth(-120)
t.fd(30)
t.pensize(6)
wheregoto(-196,133)
t.seth(-43)
t.fd(30)
wheregoto(-316,20)
t.pencolor("Orange Red2")
t.write("黑龙江",False,align="left",font=("华文彩云",18,"normal"))

#云南
t.pensize(4)
t.pencolor("red3")

#西瓜
wheregoto(-286,-147)
t.pensize(3)
t.fillcolor("chartreuse3")
t.begin_fill()
t.circle(80,360)
t.end_fill()
wheregoto(-286,-30)
t.setheading(30)
t.fillcolor("green4")
t.begin_fill()
t.circle(-85,135)
t.setheading(116)
t.circle(170,55)
t.end_fill()

wheregoto(-291,-35)
t.setheading(-20)
t.fillcolor("green4")
t.begin_fill()
t.circle(-190,49)
t.setheading(163)
t.circle(-180,51)
t.end_fill()
wheregoto(-296,-42)
t.setheading(-88)
t.fillcolor("green4")
t.begin_fill()
t.circle(115,85)
t.setheading(200)
t.circle(-85,125)
t.end_fill()

#瓜柄
wheregoto(-294,-38)
t.speed(1)
t.seth(150)
t.circle(-31,90)
t.circle(-9,148)
t.circle(-70,10)
t.circle(-40,70)
#左手
t.speed(0)
t.pencolor("red3")
wheregoto(-326,-162)#左手
t.fillcolor("seashell")
t.seth(30)
t.fd(38)
#右手
t.begin_fill()
wheregoto(-324,-162)
wheregoto(-324,-200)#右手第一条线
t.seth(30)
t.fd(70)
t.end_fill()
t.fd(10)
t.seth(65)#右手拇指
t.begin_fill()
t.fd(32)
t.circle(-8,90)
t.circle(-7,60)
t.circle(20,40)
t.seth(20)#食指
t.fd(41)
t.circle(-10,80)
t.seth(-140)
t.fd(37)
t.seth(35)#中指
t.fd(20)
t.pensize(4)
t.circle(-3,150)
t.seth(-140)
t.fd(18)
t.pensize(3.5)#小指
t.seth(30)
t.fd(11)
t.circle(-3,150)
t.seth(-150)
t.fd(42)
t.seth(-138)#右手手臂第二条线
t.fd(148)
wheregoto(-324,-202)
t.end_fill()
wheregoto(-314,-235)
t.pencolor("Orange Red2")
t.write("云南",False,align="left",font=("华文彩云",20,"normal"))

#瓜柄
wheregoto(-294,-38)
t.speed(1)
t.seth(150)
t.circle(-31,90)
t.circle(-9,148)
t.circle(-70,10)
t.circle(-40,70)
#左手
t.speed(0)
t.pencolor("red3")
wheregoto(-326,-162)#左手
t.fillcolor("seashell")
t.seth(30)
t.fd(38)
#右手
t.begin_fill()
wheregoto(-324,-162)
wheregoto(-324,-200)#右手第一条线
t.seth(30)
t.fd(70)
t.end_fill()
t.fd(10)
t.seth(65)#右手拇指
t.begin_fill()
t.fd(32)
t.circle(-8,90)
t.circle(-7,60)
t.circle(20,40)
t.seth(20)#食指
t.fd(41)
t.circle(-10,80)
t.seth(-140)
t.fd(37)
t.seth(35)#中指
t.fd(20)
t.pensize(4)
t.circle(-3,150)
t.seth(-140)
t.fd(18)
t.pensize(3.5)#小指
t.seth(30)
t.fd(11)
t.circle(-3,150)
t.seth(-150)
t.fd(42)
t.seth(-138)#右手手臂第二条线
t.fd(148)
wheregoto(-324,-202)
t.end_fill()
wheregoto(-314,-235)
t.pencolor("Orange Red2")
t.write("云南",False,align="left",font=("华文彩云",20,"normal"))
#鱼 胳膊上色
t.pencolor("seashell")
wheregoto(-143,344)
t.fillcolor("seashell")
t.setheading(-70)
t.begin_fill()
t.fd(32)
t.setheading(-60)
t.fd(65)
wheregoto(-75,276)
t.setheading(107)
t.fd(86)
t.end_fill()

t.pencolor("seashell")
wheregoto(-25,348)
t.setheading(90)
t.fillcolor("seashell")
t.begin_fill()
t.backward(80)
t.setheading(-5)
t.fd(30)
t.setheading(-90)
t.goto(20,347)
t.end_fill()

#鱼 胳膊
wheregoto(-190,300)
t.pencolor("Orange Red2")
t.write("福建",False,align="left",font=("华文彩云",20,"normal"))
t.pencolor("red3")
wheregoto(-143,348)
t.setheading(-70)
t.fd(32)
t.setheading(-60)
t.fd(65)

wheregoto(-95,348)
t.setheading(-73)
t.fd(85)
t.pencolor("red3")
wheregoto(-25,348)
t.setheading(-90)
t.fd(80)
wheregoto(20,348)
t.circle(-170,20)
t.fd(22)

# 鱼
t.setheading(20)
wheregoto(-110,267)
t.fillcolor('#EEEEEe')
t.begin_fill()
t.circle(-220,40)
t.setheading(-15)
t.circle(5,70)
t.fd(30)
t.setheading(-75)
t.fd(50)
t.setheading(170)
t.fd(28)

t.setheading(200)
wheregoto(-110,267)
t.circle(100,30)
t.setheading(-20)
t.fd(10)
t.setheading(-130)
t.fd(13)
t.setheading(-35)
t.circle(150,85)
t.end_fill()

t.setheading(-60)
wheregoto(-110,267)
t.circle(-70,55)
wheregoto(-122,235)
t.dot(10)
# 鱼鳍
wheregoto(-90,240)
t.seth(-180)
t.circle(5,190)
t.setheading(30)
t.fd(15)

wheregoto(-75,277)
t.fillcolor('#EEEEEe')
t.begin_fill()
t.setheading(35)
t.fd(35)
t.setheading(-100)
t.fd(15)
t.end_fill()

wheregoto(-75,197)
t.fillcolor('#EEEEEe')
t.begin_fill()
t.setheading(-20)
t.fd(35)
t.setheading(110)
t.fd(14)
t.end_fill()

# 鱼 细节
t.pencolor('#bebebe')
wheregoto(-60,265)
t.setheading(10)
t.circle(-7,180)
t.setheading(10)
t.circle(-7,180)
t.setheading(10)
t.circle(-7,180)
t.setheading(10)
t.circle(-7,180)
wheregoto(-40,272)
t.setheading(10)
t.circle(-8,180)
t.setheading(10)
t.circle(-9,180)
t.setheading(10)
t.circle(-8,180)
t.setheading(10)
t.circle(-7,180)
wheregoto(-18,265)
t.setheading(10)
t.circle(-7,180)
t.setheading(10)
t.circle(-7,180)
t.setheading(10)
t.circle(-7,180)
wheregoto(5,260)
t.setheading(10)
t.circle(-6,180)
t.setheading(10)
t.circle(-6,180)
wheregoto(23,258)
t.setheading(10)
t.circle(-8,180)
wheregoto(54,265)
t.pensize(6)
t.setheading(50)
t.fd(13)
wheregoto(56,258)
t.pensize(6)
t.setheading(20)
t.fd(10)

#肉
wheregoto(230,310)
t.pencolor("Orange Red2")
t.write("内蒙古",False,align="left",font=("华文彩云",20,"normal"))
t.pencolor('red3')

wheregoto(235,290)
t.fillcolor('#ffded9')
t.begin_fill()
t.setheading(125)
t.fd(20)
t.circle(17,50)
t.circle(10,40)
t.setheading(200)
t.fd(5)
t.setheading(210)
t.fd(15)
t.setheading(215)
t.fd(10)
t.setheading(220)
t.fd(5)
t.circle(-60,50)
t.circle(-30,20)
t.setheading(165)
t.circle(10,30)
t.setheading(205)
t.circle(5,50)
t.setheading(-100)
t.fd(10)
t.setheading(-100)
t.circle(60,25)
t.setheading(-60)
t.circle(55,92)
t.goto(235,260)
t.end_fill()

t.pencolor('#f97a82')
t.fillcolor('#f97a82')
t.begin_fill()
wheregoto(110,263)
t.setheading(-85)
t.fd(17)
t.setheading(-60)
t.circle(45,50)
t.circle(70,30)
t.end_fill()

t.pencolor('#ffded9')
wheregoto(110,270)
t.fillcolor('#ffded9')
t.begin_fill()
t.setheading(-50)
t.circle(70,90)
t.end_fill()

t.pencolor('red3')
wheregoto(120,260)
t.setheading(-48)
t.circle(50,80)

# 肉手
wheregoto(280,310)
t.fillcolor('seashell')
t.begin_fill()
t.setheading(205)
t.fd(50)
t.setheading(140)
t.circle(15,-90)
wheregoto(320,300)
t.end_fill()
t.begin_fill()
t.setheading(200)
t.fd(90)
t.setheading(190)
t.fd(10)
t.setheading(185)
t.fd(10)
t.setheading(180)
t.fd(5)
t.setheading(225)
t.fd(5)
t.setheading(-50)
t.fd(10)
t.setheading(212)
t.fd(28)
t.setheading(-100)
t.fd(3)
t.setheading(-45)
t.fd(3)
t.setheading(15)
t.fd(20)
t.setheading(200)
t.fd(10)
t.setheading(-100)
t.fd(4)
t.setheading(-45)
t.fd(4)
t.setheading(18)
t.fd(20)
t.setheading(200)
t.fd(10)
t.setheading(-100)
t.fd(4)
t.setheading(-45)
t.fd(4)
t.setheading(18)
t.fd(25)
t.setheading(13)
t.fd(50)
t.setheading(19)
t.fd(38)
t.end_fill()

#饼
t.speed(0)
t.pencolor("red3")
wheregoto(140,140)
t.fillcolor("sandy brown") #第二块饼
t.begin_fill()
t.seth(-135)
t.circle(40,110)
t.seth(-20)
t.fd(43)
t.seth(0)
t.circle(60,30)
t.end_fill()
wheregoto(250,100)
t.seth(45)
t.fillcolor("orange") #第一块饼
t.begin_fill()
t.circle(35,45)
t.seth(115)
t.circle(30,30)
t.seth(155)
t.fd(60)
t.circle(40,145)
t.circle(65,70)
t.end_fill()
wheregoto(147,135)
t.pensize(3)
t.seth(-90)
t.circle(35,45)
wheregoto(167,100)
t.pensize(3)
t.seth(-45)
t.circle(42,52)
#小红点
for i in range(14):
    wheregoto(random.randint(150,255), random.randint(113,139))
    t.pencolor("red3")
    t.circle(1.5)
#手
t.pensize(4)
t.pencolor("red3")
wheregoto(320,140)
t.seth(-165)
t.fillcolor("seashell")
t.begin_fill()
t.fd(60)
wheregoto(260,100)
wheregoto(320,105)
t.seth(-175)
t.fd(60)
t.circle(-30,40)
t.seth(-145)
t.circle(7,25)
t.circle(9,80)
t.right(125)
t.circle(100,17)
t.circle(2,180)
t.seth(-18)
t.circle(100,10)
t.circle(-2,180)
t.seth(-170)
t.fd(11)
t.circle(2,180)
t.seth(-5)
t.circle(-60,10)
t.seth(-90)
t.circle(5,90)
t.seth(8)
t.fd(20)
wheregoto(260,45)
t.pencolor("Orange Red2")
t.write("新疆",False,align="left",font=("华文彩云",20,"normal"))
t.pencolor("red3")
wheregoto(311,67)
t.fd(10)
t.end_fill()

#山东
t.seth(-90)
wheregoto(320,-100)
t.fillcolor("seashell")
t.begin_fill()
t.right(100)
t.forward(40)
wheregoto(272,-118)
wheregoto(320,-130)
t.right(4)
t.forward(22)
t.circle(-220,9)
t.circle(-100,10)
t.right(15)
t.forward(18)#大拇指
t.seth(-90)
t.circle(-40,20)
t.circle(-21,50)#手窝
t.seth(172)#食指方向
t.fd(30)
t.circle(2,170)#食指的弧度
t.forward(26)#食指的长度
t.left(10)
t.bk(20)
t.seth(270)
t.circle(5,65)
t.forward(19)
t.left(13)
t.bk(9)
t.seth(270)
t.circle(5,79)
t.forward(30)
t.right(18)
t.circle(179,26)
t.end_fill()
wheregoto(250,-180)
t.pencolor("Orange Red2")
t.write("山东",False,align="left",font=("华文彩云",20,"normal"))
t.pencolor("red3")
wheregoto(240,-90)

#蘑菇伞
wheregoto(213,-45)
t.seth(70)
t.fillcolor("sandy brown")
t.begin_fill()
t.circle(-80,17)
t.circle(-10,95)
t.circle(-50,31)
t.end_fill()
wheregoto(240,-76)
t.seth(30)
t.begin_fill()
t.circle(109,20)
t.circle(4,80)
t.seth(173)
t.circle(-39,40)
t.circle(6,82)
t.circle(12,85)
t.end_fill()

#蘑菇梗
wheregoto(272,-100)
t.seth(30)
t.fillcolor("gold")
t.begin_fill()
t.circle(40,21)
t.seth(88)
t.circle(20,28)
t.seth(158)
t.circle(-40,39)
wheregoto(250,-72)
t.seth(-76)
t.circle(120,7)
t.end_fill()

#菜叶
t.fillcolor("lawn green")
def halfcircle(degree,radius,radian): #degree表示角度,radius表示半径,radian表示弧度
    t.seth(degree)
    t.circle(radius,radian)
wheregoto(190,-115)
t.begin_fill()
halfcircle(30,23,-100)
halfcircle(10,18,-110)
t.bk(13)
halfcircle(148,-18,160)
wheregoto(155,-48)
halfcircle(100,-25,60)
halfcircle(35,-15,70)
t.fd(10)
halfcircle(-5,-10,40)
halfcircle(-10,-10,30)
halfcircle(10,-15,70)
halfcircle(0,-20,90)
halfcircle(-70,-30,30)
t.end_fill()

wheregoto(241,-91)
t.begin_fill()
halfcircle(100,20,60)
halfcircle(90,25,90)
halfcircle(125,15,100)
halfcircle(135,18,180)
halfcircle(-90,20,90)
halfcircle(-104,20,30)
halfcircle(-40,30,40)

t.seth(-90)
wheregoto(240,-92)
t.circle(-40,17)
t.circle(-21,50)#手窝
t.seth(172)#食指方向
t.fd(32)
t.end_fill()

#菜心
wheregoto(227,-105)
t.fillcolor("white")
t.begin_fill()
t.seth(150)
t.circle(-100,20)
t.circle(-3,120)
t.seth(-25)
t.fd(41)
t.end_fill()
t.seth(13)
t.circle(-22,100)
t.seth(55)
t.circle(20,100)
t.seth(167)
t.fd(18)

#叶脉
def line(x,y,degree,length): #x,y表示坐标,degree表示角度,length表示前进距离
    wheregoto(x,y)
    t.seth(degree)
    t.fd(length)
line(215,-100,-150,8)
line(205,-90,-160,15)
line(197,-80,155,25)
line(206,-77,105,15)
line(220,-83,93,12)
line(171,-42,120,10)
line(186,-42,100,8)
line(206,-50,100,7)

t.pensize(4)
wheregoto(-325,352)
t.setheading(270)
t.pencolor("gray1")
for j in range (2):
    t.forward(734)
    t.left(90)
    t.forward(650)
    t.left(90)
t.pencolor("red3")
t.penup()

#文字
t.hideturtle()
t.pencolor("orangered3")
t.penup()
t.goto(190,-320)
t.write("热干面加油!", align="right", font=("楷体", 54, "normal"))
t.done()
  • 13
    点赞
  • 49
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值