窗台上的小鸟
灵感来源于下图:
窗口小鸟小鸟
from turtle import *
pensize(4)
for i in range(4):
fd(200)
rt(90)
pensize(4)
goto(40, -40)
goto(40, -160)
goto(0, -200)
pu()
goto(0, -10)
pensize(1)
pd()
goto(30, -40)
goto(30, -160)
goto(0, -190)
pu()
goto(200, 0)
pd()
pensize(4)
goto(160, -40)
goto(160, -160)
goto(200, -200)
pu()
goto(200, -10)
pd()
pensize(1)
goto(170, -40)
goto(170, -160)
goto(200, -190)
# 180/10
# 120/10
for i in range(10):
pu()
goto(0, -10 - 18 * i)
pd()
goto(30, -40 - 12 * i)
for i in range(10):
pu()
goto(200, -10 - 18 * i)
pd()
goto(170, -40 - 12 * i)
pu()
goto(20, -180)
pd()
pensize(4)
goto(180, -180)
ht()
pu()
goto(110,-160)
addshape('bird.gif')
shape('bird.gif')
st()
运行结果如下:
运行结果
网友评论