python海龟绘图turtle(一起向未来)

版权说明:

<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="知识共享许可协议" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/80x15.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">python海龟绘图turtle(一起向未来)</span> 由 <a xmlns:cc="http://creativecommons.org/ns#" href="https://blog.csdn.net/Hexiankai/article/details/124600929" property="cc:attributionName" rel="cc:attributionURL">Hexiankai</a> 采用 <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">知识共享 署名 4.0 国际 许可协议</a>进行许可。<br />基于<a xmlns:dct="http://purl.org/dc/terms/" href="https://blog.csdn.net/Hexiankai/article/details/124600929" rel="dct:source">https://blog.csdn.net/Hexiankai/article/details/124600929</a>上的作品创作。

Python画图我们需要使用turtle库,粘贴运行即可 源码如下:

#import turtle_CS
#turtle_CS.draw_cs()
import turtle as t
t.hideturtle()
t.colormode(255)
t.speed(10000)
t.setup(1000,700,-531,15)
#t.setheading(90)
#t.fd(350)
#画框#
t.penup()
t.goto(-500,-345)
t.pendown()
t.setheading(0)
t.fd(990)
t.setheading(90)
t.fd(695)
t.setheading(180)
t.fd(990)
t.setheading(-90)
t.fd(695)
#天空#
t.penup()
t.goto(-499,110)
t.fillcolor(99,184,255)
t.begin_fill()
t.setheading(0)
t.fd(988)
t.setheading(90)
t.fd(239)
t.setheading(180)
t.fd(988)
t.end_fill()
#地板#
t.penup()
t.goto(-499,-175)
t.fillcolor(246,246,179)
t.begin_fill()
t.setheading(0)
t.fd(988)
t.setheading(-90)
t.fd(175)
t.setheading(180)
t.fd(988)
t.end_fill()
#刷新#
t.penup()
t.goto(-480,130)
t.fillcolor(205,253,255)#
t.begin_fill()
t.setheading(0)
t.fd(200)
t.setheading(-90)
t.fd(330)
t.setheading(180)
t.fd(200)
t.end_fill()
t.goto(280,130)
t.fillcolor(205,253,255)#
t.begin_fill()
t.setheading(0)
t.fd(200)
t.setheading(-90)
t.fd(330)
t.setheading(180)
t.fd(200)
t.end_fill()
#中间屋顶
t.penup()
t.goto(-294,250)
t.pendown()
t.fillcolor("pink")
t.begin_fill()
t.setheading(0)
t.fd(580)
t.setheading(-130)
t.fd(190)
t.setheading(180)
t.fd(390)
t.end_fill()
t.penup()
t.goto(286,250)
t.pendown()
t.setheading(180)
for i in range(33):
    t.pencolor(i*6,i*6,i*6)
    t.fd(580-4*i)
    t.setheading(-80)
    t.fd(3)
    t.setheading(0)
    t.fd(580-4*i)
    t.setheading(-150)
    t.fd(3)
    t.setheading(180)
#左上屋顶
t.pencolor(139,126,102)
t.pencolor("black")
t.penup()
t.goto(-500,210)
t.fillcolor(255,255,240)
t.begin_fill()
t.pendown()
t.setheading(90)
t.fd(20)
t.setheading(45)
t.fd(170)
t.setheading(-50)
t.fd(262)
t.setheading(-180)
t.fd(20)
t.end_fill()
t.penup()
t.fillcolor(205,85,85)#
t.begin_fill()
t.goto(-500,150)
t.pendown()
t.setheading(90)
t.fd(60)
t.setheading(45)
t.fd(170)
t.setheading(-50)
t.fd(237)
t.end_fill()
#窗户(小方块)#
t.fillcolor(135,206,255)#
t.begin_fill()
t.penup()
t.goto(-407,240)
t.pendown()
t.setheading(0)
t.fd(50)
t.setheading(90)
t.fd(60)
t.setheading(-180)
t.fd(50)
t.setheading(-90)
t.fd(60)
t.end_fill()
t.penup()
t.goto(-385,295)
t.pendown()
t.fillcolor(238,173,14)
t.begin_fill()
for i in range(19):
    t.forward(50)
    t.left(170)
    t.end_fill()
t.fillcolor(135,206,255)#
t.begin_fill()
t.penup()
t.goto(-480,225)
t.pendown()
t.setheading(0)
t.fd(30)
t.setheading(-90)
t.fd(40)
t.setheading(-180)
t.fd(30)
t.setheading(90)
t.fd(40)
t.end_fill()
t.begin_fill()
t.penup()
t.goto(-430,225)
t.pendown()
t.setheading(0)
t.fd(30)
t.setheading(-90)
t.fd(40)
t.setheading(-180)
t.fd(30)
t.setheading(90)
t.fd(40)
t.end_fill()
t.begin_fill()
t.penup()
t.goto(-380,225)
t.pendown()
t.setheading(0)
t.fd(30)
t.setheading(-90)
t.fd(40)
t.setheading(-180)
t.fd(30)
t.setheading(90)
t.fd(40)
t.end_fill()
t.begin_fill()
t.penup()
t.goto(-330,225)
t.pendown()
t.setheading(0)
t.fd(30)
t.setheading(-90)
t.fd(40)
t.setheading(-180)
t.fd(30)
t.setheading(90)
t.fd(40)
t.end_fill()
#窗户(大方块)#
t.penup()
t.goto(-480,130)
t.pendown()
t.setheading(0)
t.fd(80)
t.setheading(-90)
t.fd(150)
t.setheading(150)
t.fd(92.37)
t.setheading(90)
t.fd(103.82)
t.setheading(-90)
t.fd(75)
t.setheading(90)
for i in range(35):
    t.fd(3.51)
    t.right(5)
t.penup()
t.goto(-360,130)
t.pendown()
t.setheading(0)
t.fd(80)
t.setheading(-90)
t.fd(150)
t.setheading(-180)
t.fd(80)
t.setheading(90)
t.fd(150)
t.setheading(-90)
t.fd(75)
t.setheading(90)
for i in range(35):
    t.fd(3.51)
    t.right(5)
t.penup()
t.goto(-360,0)
t.pendown()
t.setheading(0)
t.fd(80)
t.penup()
t.goto(-480,50)
t.pendown()
t.setheading(-30)
t.fd(92.37)
#左边2窗台的栏杆#
t.penup()
t.goto(-280,40)
t.pendown()
t.setheading(180)
t.fd(80)
for i in range(8):
    t.setheading(0)
    t.fd(5)
    t.setheading(-90)
    t.fd(40)
    t.setheading(0)
    t.fd(5)
    t.setheading(90)
    t.fd(40)
##左墙最窄部分#
t.penup()
t.goto(-279,130)
t.fillcolor(205,85,85)
t.begin_fill()
t.pendown()
t.setheading(0)
t.fd(14)
t.setheading(-90)
t.fd(330)
t.setheading(180)
t.fd(13.8)
t.setheading(90)
t.fd(180)
t.penup()
t.fd(150)
t.end_fill()
#左栏杆#
#栏杆#
t.penup()
t.goto(-458,38)
t.pendown()
t.setheading(30)
t.fd(65)
t.penup()
t.goto(-458,38)
t.setheading(90)
t.fd(20)
t.pendown()
t.setheading(30)
t.fd(54)
t.setheading(-150)
t.fd(74)
t.penup()
t.goto(-400,-35)
t.pendown()
t.setheading(-150)
t.fd(114)
t.penup()
t.setheading(-90)
t.fd(20)
t.pendown()
t.setheading(30)
t.fd(114)
t.penup()
t.goto(-500,-125)
t.pendown()
t.setheading(-30)
t.fd(114)
t.setheading(-90)
t.fd(20)
t.setheading(150)
t.fd(114)
t.penup()
t.goto(-475,48.5)
t.pendown()
for i in range(12):
    t.setheading(90)
    t.fd(3)
    t.setheading(0)
    t.fd(5.19)
t.penup()
t.goto(-480,50.5)
t.pendown()
for i in range(15):
    t.setheading(0)
    t.fd(5.19)
    t.setheading(-90)
    t.fd(3)
t.penup()
t.goto(-500,-91.5)
t.pendown()
for i in range(19):
    t.setheading(90)
    t.fd(3)
    t.setheading(0)
    t.fd(5.19)
t.penup()
t.goto(-499.5,-124.5)
t.pendown()
for i in range(19):
    t.setheading(0)
    t.fd(5.19)
    t.setheading(-90)
    t.fd(3)
t.penup()
t.goto(-400,-130)
t.pendown()
t.pensize(0.15)
t.setheading(150)
t.fd(114)
for i in range(19):
    t.setheading(-90)
    t.fd(50)
    t.setheading(90)
    t.fd(47)
    t.penup()
    t.setheading(0)
    t.fd(5.19)
    t.pendown()
t.setheading(-90)
t.fd(50)
t.penup()
t.goto(-500,-91.5)
t.setheading(90)
t.fd(50)
t.pendown()
t.pensize(0.15)
t.setheading(30)
t.fd(114)
for i in range(19):
    t.setheading(-90)
    t.fd(50)
    t.setheading(90)
    t.fd(47)
    t.penup()
    t.setheading(180)
    t.fd(5.19)
    t.pendown()
t.penup()
t.goto(-400,56.5)
t.pendown()
t.pensize(0.15)
t.setheading(150)
t.fd(90)
for i in range(15):
    t.setheading(-90)
    t.fd(50)
    t.setheading(90)
    t.fd(47)
    t.penup()
    t.setheading(0)
    t.fd(5.19)
    t.pendown()
t.setheading(-90)
t.fd(50)
t.penup()
t.goto(-475,48)
t.setheading(90)
t.fd(40)
t.pendown()
t.pensize(0.15)
t.setheading(30)
t.fd(81)
for i in range(14):
    t.setheading(-90)
    t.fd(40)
    t.setheading(90)
    t.fd(37)
    t.penup()
    t.setheading(180)
    t.fd(5.19)
    t.pendown()
##左正面墙体#
t.fillcolor(205,85,85)
t.penup()
t.goto(-265,150)
t.begin_fill()
t.pendown()
t.setheading(180)
t.fd(235)
t.setheading(-90)
t.fd(20)
t.setheading(0)
t.fd(100)
t.penup()
t.fd(40)
t.pendown()
t.fd(95)
t.end_fill()
t.begin_fill()
t.setheading(180)
t.fd(95)
t.setheading(-90)
t.fd(330)
t.setheading(180)
t.fd(40)
t.setheading(90)
t.fd(330)
t.end_fill()
t.penup()
t.goto(-480,130)
t.begin_fill()
t.pendown()
t.setheading(-90)
t.fd(330)
t.setheading(180)
t.fd(20)
t.setheading(90)
t.fd(330)
t.end_fill()
#栏杆消除#
t.penup()
t.goto(-480,130)
t.pendown()
t.fillcolor(139,50,50)
t.begin_fill()
t.setheading(-90)
t.fd(75)
t.setheading(90)
for i in range(37):
    t.fd(3.51)
    t.right(5)
t.setheading(90)
t.fd(75)
t.setheading(180)
t.fd(80)
t.end_fill()
t.penup()
t.goto(-360,130)
t.pendown()
t.fillcolor(139,50,50)
t.begin_fill()
t.setheading(-90)
t.fd(75)
t.setheading(90)
for i in range(37):
    t.fd(3.51)
    t.right(5)
t.setheading(90)
t.fd(75)
t.setheading(180)
t.fd(80)
t.end_fill()
#左柱子s#
t.penup()
t.goto(-130,200)
t.pendown()
t.fillcolor(255,95,95)
t.begin_fill()
t.setheading(180)
t.fd(30)
t.setheading(-90)
t.fd(104)
t.penup()
t.fd(30)
t.pendown()
t.fd(255)
t.setheading(0)
t.fd(30)
t.end_fill()
t.fillcolor(255,195,195)#
t.begin_fill()
t.setheading(45)
t.fd(20)
t.end_poly()
t.setheading(225)
t.fd(20)
t.setheading(90)
t.fd(390)
t.setheading(-45)
t.fd(20)
t.setheading(-90)
t.fd(363)
t.end_fill()
t.penup()
t.goto(-270,130)
t.pendown()
t.pencolor(139,126,102)
t.pensize(0.0001)
t.setheading(-90)
t.fd(330)
#左侧墙#
t.pencolor("black")
t.fillcolor(205,85,85)#
t.penup()
t.goto(-265,150)
t.begin_fill()
t.pendown()
t.setheading(0)
t.fd(65)
t.setheading(-30)
t.fd(57)
t.setheading(-90)
t.fd(25)
t.setheading(150)
t.fd(57)
t.setheading(-180)
t.fd(65)
t.setheading(90)
t.fd(25)
t.setheading(0)
t.fd(30)
t.setheading(-90)
t.fd(350)
t.setheading(-180)
t.fd(30)
t.setheading(90)
t.fd(350)
t.setheading(0)
t.fd(65)
t.setheading(-90)
t.fd(25)
t.end_fill()
t.penup()
t.goto(-235,120)
t.pendown()
t.fillcolor(155,55,55)#
t.begin_fill()
t.setheading(0)
t.fd(30)
t.penup()
t.goto(-203,120)
t.pendown()
t.setheading(50)
t.pensize(1.5)
t.fd(6)
t.pensize(1)
t.setheading(180)
t.fd(35)
t.end_fill()
t.penup()
t.goto(-205,120)
t.begin_fill()
t.pendown()
t.setheading(-29)
t.fd(50)
t.setheading(12)
t.fd(10)
t.pensize(1)
t.setheading(150)
t.fd(53)
t.end_fill()
t.penup()
t.goto(-203,120)
t.pendown()
t.setheading(50)
t.pensize(1.5)
t.fd(6)
t.pensize(1)
t.goto(-203,119)
t.fillcolor(255,135,135)#
t.begin_fill()
t.setheading(-90)
t.fd(319)
t.setheading(15)
t.fd(45)
t.setheading(90)
t.fd(283)
t.end_fill()
t.penup()
t.goto(-204,-200)
t.fillcolor(225,105,105)#
t.begin_fill()
t.pendown()
t.setheading(180)
t.fd(30)
t.setheading(90)
t.fd(320)
t.setheading(0)
t.fd(30)
t.end_fill()
#正门#
t.penup()
t.goto(-116,-175)
t.pendown()
t.setheading(0)
t.fd(232)
t.pencolor("black")
#右上屋顶#
t.penup()
t.goto(490,210)
t.fillcolor(255,255,240)
t.begin_fill()
t.pendown()
t.setheading(90)
t.fd(20)
t.setheading(135)
t.fd(170)
t.setheading(-130)
t.fd(262)
t.setheading(180)
t.fd(-20)
t.end_fill()
t.penup()
t.goto(490,150)
t.pendown()
t.fillcolor(205,85,85)
t.begin_fill()
t.setheading(90)
t.fd(60)
t.setheading(135)
t.fd(170)
t.setheading(-130)
t.fd(237)
t.end_fill()
#窗户(小方块)#
t.fillcolor(135,206,255)#
t.begin_fill()
t.penup()
t.goto(350,240)
t.pendown()
t.setheading(0)
t.fd(50)
t.setheading(90)
t.fd(60)
t.setheading(-180)
t.fd(50)
t.setheading(-90)
t.fd(60)
t.end_fill()
t.penup()
t.goto(373,295)
t.pendown()
t.fillcolor(238,173,14)
t.begin_fill()
for i in range(19):
    t.forward(50)
    t.left(170)
    t.end_fill()
#四个小窗户#
t.fillcolor(135,206,255)#
t.begin_fill()
t.penup()
t.goto(465,225)
t.pendown()
t.setheading(180)
t.fd(30)
t.setheading(-90)
t.fd(40)
t.setheading(0)
t.fd(30)
t.setheading(90)
t.fd(40)
t.end_fill()
t.begin_fill()
t.penup()
t.goto(415,225)
t.pendown()
t.setheading(180)
t.fd(30)
t.setheading(-90)
t.fd(40)
t.setheading(0)
t.fd(30)
t.setheading(90)
t.fd(40)
t.end_fill()
t.begin_fill()
t.penup()
t.goto(380,225)
t.pendown()
t.setheading(180)
t.fd(30)
t.setheading(-90)
t.fd(40)
t.setheading(0)
t.fd(30)
t.setheading(90)
t.fd(40)
t.end_fill()
t.begin_fill()
t.penup()
t.goto(330,225)
t.pendown()
t.setheading(180)
t.fd(30)
t.setheading(-90)
t.fd(40)
t.setheading(0)
t.fd(30)
t.setheading(90)
t.fd(40)
t.end_fill()
#窗户(大方块)#
t.penup()
t.goto(480,130)
t.pendown()
t.setheading(180)
t.fd(80)
t.setheading(-90)
t.fd(150)
t.setheading(30)
t.fd(92.37)
t.setheading(90)
t.fd(103.82)
t.setheading(-90)
t.fd(75)
t.setheading(90)
for i in range(35):
    t.fd(3.51)
    t.left(5)
t.penup()
t.goto(360,130)
t.pendown()
t.setheading(180)
t.fd(80)
t.setheading(-90)
t.fd(150)
t.setheading(0)
t.fd(80)
t.setheading(90)
t.fd(150)
t.setheading(-90)
t.fd(75)
t.setheading(90)
for i in range(35):
    t.fd(3.51)
    t.left(5)
t.penup()
t.goto(360,0)
t.pendown()
t.setheading(180)
t.fd(80)
t.penup()
t.goto(480,50)
t.pendown()
t.setheading(-150)
t.fd(92.37)
#左边2窗台的栏杆#
t.penup()
t.goto(360,40)
t.pendown()
t.setheading(180)
t.fd(80)
for i in range(8):
    t.setheading(0)
    t.fd(5)
    t.setheading(-90)
    t.fd(40)
    t.setheading(0)
    t.fd(5)
    t.setheading(90)
    t.fd(40)
#梯坎#
t.penup()
t.goto(458,38)
t.pendown()
t.setheading(150)
t.fd(65)
t.penup()
t.goto(458,38)
t.setheading(90)
t.fd(20)
t.pendown()
t.setheading(150)
t.fd(54)
t.setheading(-30)
t.fd(74)
t.penup()
t.goto(400,-35)
t.pendown()
t.setheading(-30)
t.fd(114)
t.penup()
t.setheading(-90)
t.fd(20)
t.pendown()
t.setheading(150)
t.fd(114)
t.penup()
t.goto(500,-125)
t.pendown()
t.setheading(-150)
t.fd(114)
t.setheading(-90)
t.fd(20)
t.setheading(30)
t.fd(114)
t.penup()
t.goto(475,48.5)
t.pendown()
for i in range(12):
    t.setheading(90)
    t.fd(3)
    t.setheading(180)
    t.fd(5.19)
t.penup()
t.goto(480,50.5)
t.pendown()
for i in range(15):
    t.setheading(180)
    t.fd(5.19)
    t.setheading(-90)
    t.fd(3)
t.penup()
t.goto(500,-91.5)
t.pendown()
for i in range(19):
    t.setheading(90)
    t.fd(3)
    t.setheading(180)
    t.fd(5.19)
t.penup()
t.goto(499.5,-124.5)
t.pendown()
for i in range(19):
    t.setheading(180)
    t.fd(5.19)
    t.setheading(-90)
    t.fd(3)
#栏杆#
t.penup()
t.goto(400,-130)
t.pendown()
t.pensize(0.15)
t.setheading(30)
t.fd(114)
for i in range(19):
    t.setheading(-90)
    t.fd(50)
    t.setheading(90)
    t.fd(47)
    t.penup()
    t.setheading(180)
    t.fd(5.19)
    t.pendown()
t.setheading(-90)
t.fd(50)
t.penup()
t.goto(500,-91.5)
t.setheading(90)
t.fd(50)
t.pendown()
t.pensize(0.17)
t.setheading(150)
t.fd(114)
for i in range(19):
    t.setheading(-90)
    t.fd(50)
    t.setheading(90)
    t.fd(47)
    t.penup()
    t.setheading(0)
    t.fd(5.19)
    t.pendown()
t.penup()
t.goto(400,56.5)
t.pendown()
t.pensize(0.19)
t.setheading(30)
t.fd(90)
for i in range(15):
    t.setheading(-90)
    t.fd(50)
    t.setheading(90)
    t.fd(47)
    t.penup()
    t.setheading(180)
    t.fd(5.19)
    t.pendown()
t.setheading(-90)
t.fd(50)
t.penup()
t.goto(475,48)
t.setheading(90)
t.fd(40)
t.pendown()
t.pensize(0.21)
t.setheading(150)
t.fd(81)
for i in range(14):
    t.setheading(-90)
    t.fd(40)
    t.setheading(90)
    t.fd(37)
    t.penup()
    t.setheading(0)
    t.fd(5.19)
    t.pendown()
#右正面墙体#
t.fillcolor(205,85,85)#
t.penup()
t.goto(265,150)
t.begin_fill()
t.pendown()
t.setheading(0)
t.fd(225)
t.setheading(-90)
t.fd(20)
t.setheading(180)
t.fd(90)
t.penup()
t.fd(40)
t.pendown()
t.fd(95)
t.end_fill()
t.begin_fill()
t.setheading(0)
t.fd(95)
t.setheading(-90)
t.fd(330)
t.setheading(0)
t.fd(40)
t.setheading(90)
t.fd(330)
t.end_fill()
t.penup()
t.goto(480,130)
t.begin_fill()
t.pendown()
t.setheading(-90)
t.fd(330)
t.setheading(0)
t.fd(10)
t.setheading(90)
t.fd(330)
t.end_fill()
#柱子#
t.fillcolor(255,95,95)#
t.penup()
t.goto(130,200)
t.begin_fill()
t.pendown()
t.setheading(-135)
t.fd(20)
t.setheading(0)
t.fd(30)
t.setheading(45)
t.fd(20)
t.setheading(180)
t.fd(30)
t.end_fill()
t.fillcolor(255,95,95)#
t.begin_fill()
t.setheading(0)
t.fd(30)
t.setheading(-90)
t.fd(74)
t.penup()
t.fd(30)
t.pendown()
t.fd(285)
t.setheading(180)
t.fd(30)
t.setheading(135)
t.fd(20)
t.setheading(-45)
t.fd(20)
t.setheading(90)
t.fd(360)
t.end_fill()
t.fd(30)
t.penup()
t.goto(160,200)
t.pendown()
t.setheading(180)
t.fd(30)
t.fillcolor(255,195,195)#
t.begin_fill()
t.setheading(-135)
t.fd(20)
t.setheading(-90)
t.fd(360)
t.setheading(-45)
t.fd(20)
t.end_fill()
#右侧墙#
t.fillcolor(205,85,85)
t.penup()
t.goto(265,150)
t.begin_fill()
t.pendown()
t.setheading(180)
t.fd(65)
t.setheading(-150)
t.fd(57)
t.setheading(-90)
t.fd(25)
t.setheading(30)
t.fd(57)
t.setheading(0)
t.fd(65)
t.setheading(90)
t.fd(25)
t.setheading(180)
t.fd(30)
t.setheading(-90)
t.fd(350)
t.setheading(0)
t.fd(30)
t.setheading(90)
t.fd(350)
t.setheading(180)
t.fd(65)
t.setheading(-90)
t.fd(25)
t.end_fill()
t.penup()
t.goto(235,120)
t.fillcolor(155,55,55)#
t.begin_fill()
t.pendown()
t.setheading(180)
t.fd(31)
t.pensize(1.5)
t.setheading(135)
t.fd(7)
t.pensize(1)
t.setheading(0)
t.fd(35)
t.end_fill()
t.penup()
t.goto(204,120)
t.begin_fill()
t.pendown()
t.setheading(-150)
t.fd(50)
t.pensize(1.5)
t.setheading(168)
t.fd(10)
t.pensize(1)
t.setheading(30)
t.fd(54)
t.end_fill()
t.penup()
t.goto(203,120)
t.pendown()
t.setheading(130)
t.pensize(1.5)
t.fd(6)
t.fillcolor(225,105,105)#
t.pensize(1)
t.goto(203,119)
t.begin_fill()
t.setheading(-90)
t.fd(319)
t.setheading(0)
t.fd(30)
t.pensize(3)
t.setheading(90)
t.fd(319)
t.pensize(1)
t.setheading(180)
t.fd(30)
t.end_fill()
t.fillcolor(255,135,135)#
t.penup()
t.goto(160.5,-188)
t.begin_fill()
t.pendown()
t.setheading(-15)
t.fd(45)
t.setheading(90)
t.fd(319)
t.setheading(-149.5)
t.fd(51.5)
t.end_fill()
########栏杆消除########
t.penup()
t.goto(480,130)
t.pendown()
t.fillcolor(139,50,50)
t.begin_fill()
t.setheading(-90)
t.fd(75)
t.setheading(90)
for i in range(37):
    t.fd(3.51)
    t.left(5)
t.setheading(90)
t.fd(75)
t.setheading(0)
t.fd(80)
t.end_fill()
t.penup()
t.goto(360,130)
t.pendown()
t.fillcolor(139,50,50)
t.begin_fill()
t.setheading(-90)
t.fd(75)
t.setheading(90)
for i in range(37):
    t.fd(3.51)
    t.left(5)
t.setheading(90)
t.fd(75)
t.setheading(0)
t.fd(80)
t.end_fill()
#右边偏左小墙体#
t.penup()
t.goto(266,130)
t.fillcolor(205,85,85)#
t.begin_fill()
t.pendown()
t.setheading(-90)
t.fd(330)
t.setheading(0)
t.fd(14)
t.setheading(90)
t.fd(330)
t.setheading(180)
t.fd(14)
t.end_fill()
t.fillcolor(205,85,85)#
t.begin_fill()
t.setheading(0)
t.fd(3)
t.setheading(-90)
t.fd(330)
t.setheading(180)
t.fd(3)
t.end_fill()
#图书馆下方墙体#
t.penup()
t.goto(-116,-50)
t.fillcolor(205,85,85)#
t.begin_fill()
t.pendown()
t.setheading(-90)
t.fd(126)
t.setheading(0)
t.fd(232)
t.setheading(90)
t.fd(126)
t.end_fill()
#正面拱门#
t.penup()
t.goto(-110,-176)
t.pendown()
t.fillcolor(233,253,251)#
t.begin_fill()
t.setheading(90)
t.fd(70)
t.setheading(90)
for i in range(37):
    t.fd(3.51)
    t.right(5)
t.setheading(-90)
t.fd(70)
t.end_fill()
t.penup()
t.goto(29,-176)
t.pendown()
t.fillcolor(233,253,251)#
t.begin_fill()
t.setheading(90)
t.fd(70)
t.setheading(90)
for i in range(37):
    t.fd(3.51)
    t.right(5)
t.setheading(-90)
t.fd(70)
t.end_fill()
t.penup()
t.goto(-116,-50)
t.pendown()
t.fillcolor(245,245,220)#
t.begin_fill()
t.setheading(0)
t.fd(232)
t.setheading(90)
t.fd(11)
t.setheading(180)
t.fd(232)
t.end_fill()
t.penup()
t.goto(0,-52)
t.write("LIBRARY",False,'center')
#图书馆背后填色#
t.penup()
t.goto(116,90)
t.fillcolor(205,85,85)#
t.begin_fill()
t.setheading(180)
t.fd(232)
t.setheading(-90)
t.fd(129)
t.setheading(0)
t.fd(232)
t.setheading(90)
t.fd(129)
t.end_fill()
#窗户1#
t.penup()
t.goto(-116,40)
t.fillcolor(245,255,250)#
t.begin_fill()
t.pendown()
t.setheading(-30)
t.fd(30)
t.setheading(-90)
t.fd(64)
t.setheading(0)
t.fd(3)
t.setheading(90)
t.fd(66)
t.setheading(-135)
t.fd(3)
t.setheading(180)
t.fd(26)
t.setheading(0)
t.fd(26)
t.pensize(1.5)
t.setheading(45)
t.fd(3)
t.pensize(1)
t.setheading(150)
t.fd(35)
t.end_fill()
t.fillcolor(240,248,255)#
t.begin_fill()
t.penup()
t.goto(-116,40)
t.pendown()
t.setheading(-30)
t.fd(30)
t.setheading(-90)
t.fd(64)
t.setheading(180)
t.fd(26)
t.end_fill()
t.penup()
t.goto(-90,-10)
t.setheading(180)
t.pendown()
t.fd(26)
t.penup()
t.goto(-90,25)
t.setheading(180)
t.pendown()
t.fd(26)
#窗户2#
t.penup()
t.goto(-64,-39)
t.fillcolor(245,255,250)#
t.begin_fill()
t.pendown()
t.setheading(90)
t.fd(66)
t.setheading(30)
t.fd(35)
t.setheading(-30)
t.fd(35)
t.setheading(-90)
t.fd(66)
t.end_fill()
t.fillcolor(240,248,255)#
t.begin_fill()
t.setheading(180)
t.fd(4)
t.setheading(90)
t.fd(64)
t.setheading(150)
t.fd(30)
t.setheading(-150)
t.fd(31)
t.setheading(-90)
t.fd(63)
t.end_fill()
t.setheading(180)
t.fd(4)
t.penup()
t.goto(-3,27)
t.pendown()
t.setheading(-150)
t.pensize(2)
t.fd(4)
t.pensize(1)
t.setheading(180)
t.fd(55)
t.pensize(2)
t.setheading(135)
t.fd(3)
t.pensize(1)
t.penup()
t.goto(-7,-10)
t.pendown()
t.setheading(180)
t.fd(53)
t.penup()
t.goto(-34,40)
t.pendown()
t.setheading(-90)
t.fd(79)
#窗户3#
t.penup()
t.goto(3,-39)
t.fillcolor(245,255,250)#
t.begin_fill()
t.pendown()
t.setheading(90)
t.fd(66)
t.setheading(30)
t.fd(35)
t.setheading(-30)
t.fd(35)
t.setheading(-90)
t.fd(66)
t.end_fill()
t.fillcolor(240,248,255)#
t.begin_fill()
t.setheading(180)
t.fd(4)
t.setheading(90)
t.fd(64)
t.setheading(150)
t.fd(30)
t.setheading(-150)
t.fd(31)
t.setheading(-90)
t.fd(63)
t.end_fill()
t.setheading(180)
t.fd(4)
t.penup()
t.goto(64,27)
t.pendown()
t.setheading(-150)
t.pensize(2)
t.fd(4)
t.pensize(1)
t.setheading(180)
t.fd(55)
t.pensize(2)
t.setheading(135)
t.fd(3)
t.pensize(1)
t.penup()
t.goto(60,-10)
t.pendown()
t.setheading(180)
t.fd(53)
t.penup()
t.goto(33,40)
t.pendown()
t.setheading(-90)
t.fd(79)
#窗户4#
t.penup()
t.goto(116,-39)
t.pendown()
t.fillcolor(245,255,250)#
t.begin_fill()
t.setheading(180)
t.fd(29)
t.setheading(90)
t.fd(66)
t.setheading(30)
t.fd(35)
t.end_fill()
t.fillcolor(240,248,255)#
t.begin_fill()
t.setheading(-90)
t.fd(4)
t.setheading(-150)
t.fd(30)
t.setheading(-90)
t.fd(64)
t.setheading(0)
t.fd(26)
t.end_fill()
t.penup()
t.goto(92,-10)
t.setheading(0)
t.pendown()
t.fd(26)
t.penup()
t.goto(88,27)
t.pendown()
t.setheading(0)
t.pensize(2)
t.setheading(-45)
t.fd(3)
t.setheading(0)
t.pensize(1)
t.fd(26)
#图#
t.penup()
t.goto(-100,-39)
t.fillcolor("white")#
t.begin_fill()
t.pendown()
t.setheading(0)
t.fd(40)
t.setheading(90)
t.fd(40)
t.setheading(180)
t.fd(40)
t.setheading(-90)
t.fd(40)
t.end_fill()
t.penup()
t.goto(-80,-38)
t.write("图", align="center", font=("Arial Noav", 26, "normal"))
#书#
t.penup()
t.goto(-20,-39)
t.fillcolor("white")#
t.begin_fill()
t.pendown()
t.setheading(0)
t.fd(40)
t.setheading(90)
t.fd(40)
t.setheading(180)
t.fd(40)
t.setheading(-90)
t.fd(40)
t.end_fill()
t.penup()
t.goto(0,-38)
t.write("书", align="center", font=("Arial Noav", 26, "normal"))
#馆#
t.penup()
t.goto(54,-39)
t.fillcolor("white")#
t.begin_fill()
t.pendown()
t.setheading(0)
t.fd(40)
t.setheading(90)
t.fd(40)
t.setheading(180)
t.fd(40)
t.setheading(-90)
t.fd(40)
t.end_fill()
t.penup()
t.goto(75,-38)
t.write("馆", align="center", font=("Arial Noav", 26, "normal"))
#二楼#
t.penup()
t.goto(-116,90)
t.pendown()
t.fillcolor(245,245,220)
t.begin_fill()
t.setheading(0)
t.fd(232)
t.setheading(90)
t.fd(25)
t.setheading(180)
t.fd(232)
t.setheading(-90)
t.fd(25)
t.end_fill()
t.setheading(90)
t.fd(65)
t.setheading(0)
t.fd(232)
#中间小楼2#
t.penup()
t.goto(0,200)
t.fillcolor(245,255,250)
t.begin_fill()
t.pendown()
t.setheading(-30)
t.fd(35)
t.setheading(-135)
t.fd(5)
t.setheading(150)
t.fd(32)
t.setheading(-150)
t.fd(32)
t.setheading(135)
t.fd(5)
t.setheading(29.9)
t.fd(36)
t.end_fill()
t.penup()
t.goto(27,178)
t.pendown()
t.fillcolor(245,255,250)
t.begin_fill()
t.setheading(150)
t.fd(32)
t.setheading(-150)
t.fd(32)
t.end_fill()
t.penup()
t.goto(25,180)
t.pendown()
t.fillcolor(245,255,250)
t.begin_fill()
t.setheading(-90)
t.fd(65)
t.setheading(180)
t.fd(50)
t.setheading(90)
t.fd(65)
t.end_fill()
#中间小楼1#
t.penup()
t.goto(-80,200)
t.pendown()
t.fillcolor(245,255,250)
t.begin_fill()
t.setheading(-45)
t.fd(35)
t.setheading(-125)
t.fd(5)
t.setheading(135)
t.fd(32)
t.setheading(-135)
t.fd(32)
t.setheading(125)
t.fd(5)
t.setheading(45)
t.fd(35)
t.end_fill()
t.penup()
t.goto(-58,170)
t.pendown()
t.fillcolor(245,255,250)
t.begin_fill()
t.setheading(135)
t.fd(32)
t.setheading(-135)
t.fd(32)
t.end_fill()
t.penup()
t.goto(-100,173)
t.pendown()
t.fillcolor(245,255,250)
t.begin_fill()
t.setheading(-90)
t.fd(58)
t.setheading(0)
t.fd(40)
t.setheading(90)
t.fd(58)
t.end_fill()
#中间小楼3#
t.penup()
t.goto(80,200)
t.pendown()
t.fillcolor(245,255,250)
t.begin_fill()
t.setheading(-45)
t.fd(35)
t.setheading(-125)
t.fd(5)
t.setheading(135)
t.fd(32)
t.setheading(-135)
t.fd(32)
t.setheading(125)
t.fd(5)
t.setheading(45)
t.fd(35)
t.end_fill()
t.penup()
t.goto(57,170)
t.pendown()
t.fillcolor(245,255,250)
t.begin_fill()
t.setheading(45)
t.fd(32)
t.setheading(-45)
t.fd(32)
t.end_fill()
t.penup()
t.goto(100,173)
t.pendown()
t.fillcolor(245,255,250)
t.begin_fill()
t.setheading(-90)
t.fd(58)
t.setheading(180)
t.fd(40)
t.setheading(90)
t.fd(58)
t.end_fill()
#二楼栏杆#
t.penup()
t.goto(-116,155)
t.pendown()
for i in range(46):
    t.setheading(-80)
    t.fd(40)
    t.setheading(100)
    t.fd(40)
    t.setheading(0)
    t.fd(5)
for i in range(45):
    t.setheading(-100)
    t.fd(40)
    t.setheading(80)
    t.fd(40)
    t.setheading(180)
    t.fd(5)

'''
#右手#
t.penup()
t.goto(64.5,-142)
t.pencolor("black")
t.pensize(1)
t.fillcolor("black")
t.begin_fill()
t.setheading(95)
t.pendown()
t.circle(-14.8, 160)
t.circle(-8,50)
t.circle(-80,30)
t.end_fill()
#右手#
t.penup()
t.goto(62.5,-135)
t.pencolor("lightgray")
t.pensize(3)
t.fillcolor("white")
t.begin_fill()
t.pendown()
t.setheading(80)
t.circle(-18, 200)
t.circle(-120, 23)
t.end_fill()
#左手内#
t.penup()
t.goto(64.5,-142)
t.pencolor("black")
t.pensize(1)
t.fillcolor("black")
t.begin_fill()
t.setheading(95)
t.pendown()
t.circle(-14.8, 160)
t.circle(-8,50)
t.circle(-80,30)
t.end_fill()
#轮廓#
#头顶#
t.penup()
t.goto(-40,-90)
t.pencolor("lightgray")
t.pensize(3)
t.fillcolor("white")
t.begin_fill()
t.pendown()
t.setheading(20)
t.circle(-100, 35)
#左耳#
t.setheading(50)
t.circle(-16.8, 180)
#左侧#
t.setheading(-50)
t.circle(-76, 30)
t.circle(-128, 45)
#左腿#
t.circle(48, 30)
t.circle(80, 12)
t.circle(-7.2, 85)
t.circle(-72, 23)
t.circle(-8, 110)
t.circle(6, 115)
t.circle(40, 12)
#右腿#
t.circle(6, 120)
t.circle(-6, 110)
t.circle(-60, 30)
t.circle(-6, 70)
t.circle(-60, 10)
t.circle(80, 35)
t.circle(-60, 20)
#右手#
t.setheading(-120)
t.circle(20, 30)
t.circle(-14, 200)
t.circle(-120, 23)
#右侧#
t.setheading(86)
t.circle(-120, 26)
#右耳#
t.setheading(122)
t.circle(-21.2, 160)
t.end_fill()
#右耳内#
t.penup()
t.goto(-63, -107)
t.pencolor("black")
t.pensize(1)
t.fillcolor("black")
t.begin_fill()
t.pendown()
t.setheading(120)
t.circle(-11.2, 160)
t.setheading(210)
t.circle(60, 20)
t.end_fill()
#左耳内#
t.penup()
t.goto(25, -89)
t.setheading(40)
t.begin_fill()
t.pendown()
t.circle(-12, 170)
t.setheading(125)
t.circle(60, 23)
t.end_fill()
#右手内#
t.penup()
t.goto(-84.5, -205.5)
t.fillcolor("black")
t.begin_fill()
t.setheading(-120)
t.pendown()
t.circle(20, 30)
t.circle(-10.8, 200)
t.circle(-120, 20)
t.setheading(-90)
t.circle(120, 14)
t.end_fill()
#左腿内#
t.penup()
t.goto(32.5, -250)
t.fillcolor("black")
t.begin_fill()
t.pendown()
t.setheading(-115)
t.circle(44, 15)
t.circle(80, 10)
t.circle(-7.2, 80)
t.circle(-72, 13)
t.circle(-8, 90)
t.circle(6, 60)
t.setheading(42)
t.circle(-80, 29)
t.end_fill()
#右腿内#
t.penup()
t.goto(-27, -266)
t.fillcolor("black")
t.begin_fill()
t.pendown()
t.setheading(-155)
t.circle(6, 100)
t.circle(-4, 110)
t.circle(-40, 30)
t.circle(-6, 65)
t.circle(-40, 10)
t.circle(80, 15)
t.setheading(-14)
t.circle(-80, 27)
t.end_fill()
#右眼#
#眼圈#
t.penup()
t.goto(-36, -129)
t.fillcolor("black")
t.begin_fill()
t.pendown()
t.setheading(40)
t.circle(-14, 152)
t.circle(-40, 50)
t.circle(-14, 130)
t.circle(-40, 50)
t.end_fill()
#眼珠#
t.penup()
t.goto(-28.6, -151)
t.fillcolor("white")
t.begin_fill()
t.pendown()
t.setheading(0)
t.circle(8.8, 360)
t.end_fill()
t.penup()
t.goto(-28.7, -150)
t.pencolor("darkslategray")
t.fillcolor("darkslategray")
t.begin_fill()
t.pendown()
t.setheading(0)
t.circle(7, 360)
t.end_fill()
t.penup()
t.goto(-28.8, -150)
t.fillcolor("BLACK")
t.begin_fill()
t.pendown()
t.setheading(0)
t.circle(4.7, 360)
t.end_fill()
t.penup()
t.goto(-28.5, -143)
t.pencolor("white")
t.fillcolor("white")
t.begin_fill()
t.pendown()
t.setheading(0)
t.circle(2, 360)
t.end_fill()
#左眼#
#眼圈#
t.penup()
t.goto(6,-145)
t.fillcolor("black")
t.begin_fill()
t.pendown()
t.setheading(120)
t.circle(-12.8, 152)
t.circle(-40, 55)
t.circle(-10, 120)
t.circle(-48, 45)
t.end_fill()
#眼珠#
t.penup()
t.goto(19,-152)
t.fillcolor("white")
t.begin_fill()
t.pendown()
t.setheading(0)
t.circle(7, 360)
t.end_fill()
t.penup()
t.goto(19,-150)
t.pencolor("darkslategray")
t.fillcolor("darkslategray")
t.begin_fill()
t.pendown()
t.setheading(0)
t.circle(6, 360)
t.end_fill()
t.penup()
t.goto(19,-150)
t.fillcolor("black")
t.begin_fill()
t.pendown()
t.setheading(0)
t.circle(4, 360)
t.end_fill()
t.penup()
t.goto(19,-145)
t.pencolor("white")
t.fillcolor("white")
t.begin_fill()
t.pendown()
t.setheading(0)
t.circle(2, 360)
t.end_fill()
#鼻子#
t.penup()
t.goto(0,-150)
t.fillcolor("black")
t.begin_fill()
t.pendown()
t.circle(-3.2, 130)
t.circle(-8.8, 100)
t.circle(-3.2, 130)
t.end_fill()
#嘴#
t.penup()
t.goto(-15,-170)
t.setheading(-36)
t.begin_fill()
t.pendown()
t.circle(24, 75)
t.setheading(-130)
t.circle(-20, 105)
t.end_fill()
#彩虹圈#
t.penup()
t.goto(-67.5,-130)
t.pensize(2)
t.pencolor("cyan")
t.pendown()
t.setheading(60)
t.circle(-66, 150)
t.circle(-52, 78)
t.circle(-100, 30)
t.circle(-55.2, 105)
t.penup()
t.goto(-65.5, -132)
t.pencolor("slateblue")
t.pendown()
t.setheading(60)
t.circle(-64, 144)
t.circle(-48, 78)
t.circle(-96.8, 30)
t.circle(-54, 105)
t.penup()
t.goto(-64, -134)
t.pencolor("orangered")
t.pendown()
t.setheading(60)
t.circle(-62, 136)
t.circle(-46.4, 86)
t.circle(-88, 30)
t.circle(-53.6, 103)
t.penup()
t.goto(-62,-136)
t.pencolor("gold")
t.pendown()
t.setheading(60)
t.circle(-60, 136)
t.circle(-41.6, 86)
t.circle(-88, 30)
t.circle(-50.4, 102)
t.penup()
t.goto(-60, -138)
t.pencolor("greenyellow")
t.pendown()
t.setheading(60)
t.circle(-58, 136)
t.circle(-36, 83)
t.circle(-88, 30)
t.circle(-48, 100)
t.penup()
#爱心#
t.penup()
t.goto(85,-135)
t.pencolor("brown")
t.pensize(1)
t.fillcolor("brown")
t.begin_fill()
t.pendown()
t.setheading(36)
t.circle(-3.2, 180)
t.circle(-24, 24)
t.setheading(110)
t.circle(-24, 24)
t.circle(-3.2, 180)
t.end_fill()
#五环#
t.penup()
t.goto(-4, -252)
t.pendown()
t.pencolor("blue")
t.circle(2.4)
t.penup()
t.goto(3.5, -252)
t.pendown()
t.pencolor("black")
t.circle(2.4)
t.penup()
t.goto(11, -252)
t.pendown()
t.pencolor("brown")
t.circle(2.4)
t.penup()
t.goto(0.5, -257)
t.pendown()
t.pencolor("lightgoldenrod")
t.circle(2.4)
t.penup()
t.goto(7.5, -257)
t.pendown()
t.pencolor("green")
t.circle(2.4)
t.penup()
t.pencolor("black")
t.goto(-52, -234)
t.write("Baby's Bing Dwen Dwen", font=('Arial',6, 'bold italic'))
t.pencolor('red')
t.goto(-35, -245)
t.write("BEIJING 2022", font=('Arial',7, 'bold italic'))
#庆祝#
t.pencolor(255,228,225)
t.penup()
t.goto(0,250)
t.write("Together for a Shared Future", align="center", font=("Arial Noav", 26, "normal"))
t.goto(0,285)
t.write("一起向未来", align="center", font=("Arial Noav", 26, "normal"))
'''
t.done()

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值