598 0 分享
冰墩墩
作者:酷哥创客
更新时间:2022-02-11 09:56:28
作品简介
冰墩墩(英文:Bing Dwen Dwen,汉语拼音:bīng dūn dūn),是2022年北京冬季奥运会的吉祥物。将熊猫形象与富有超能量的冰晶外壳相结合,头部外壳造型取自冰雪运动头盔,装饰彩色光环,整体形象酷似航天员。2018年8月8日,北京冬奥会和冬残奥会吉祥物全球征集启动仪式举行。2019年9月17日晚,冰墩墩正式亮相。冰墩墩寓意创造非凡、探索未来,体现了追求卓越、引领时代,以及面向未来的无限可能。随着冬奥会的举办,冰墩墩也越发火爆起来。作为创客人,不用天天在村口等快递,不用天天在淘宝蹲点,可以先“丰衣足食”一波,来看看这个冰墩墩怎么样?
查看代码 立即练习
代码展示
# 程序功能:turtle画2022北京冬奥会冰墩墩
import turtle as t

t.getscreen().title('酷哥爱编程-冰墩墩')  # 窗口标题
t.speed(0)  # 画笔速度-最快

# 头顶
t.penup()
t.goto(-73, 230)
t.pencolor("lightgray")
t.pensize(3)
t.fillcolor("white")
t.begin_fill()
t.pendown()
t.setheading(20)
t.circle(-250, 35)
# 左耳
t.setheading(50)
t.circle(-42, 180)
# 左侧
t.setheading(-50)
t.circle(-190, 30)
t.circle(-320, 45)
# 左腿
t.circle(120, 30)
t.circle(200, 12)
t.circle(-18, 85)
t.circle(-180, 23)
t.circle(-20, 110)
t.circle(15, 115)
t.circle(100, 12)
# 右腿
t.circle(15, 120)
t.circle(-15, 110)
t.circle(-150, 30)
t.circle(-15, 70)
t.circle(-150, 10)
t.circle(200, 35)
t.circle(-150, 20)
# 右手
t.setheading(-120)
t.circle(50, 30)
t.circle(-35, 200)
t.circle(-300, 23)
# 右侧
t.setheading(86)
t.circle(-300, 26)
# 右耳
t.setheading(122)
t.circle(-53, 160)
t.end_fill()
# 右耳内侧
t.penup()
t.goto(-130, 180)
t.pencolor("black")
t.pensize(1)
t.fillcolor("black")
t.begin_fill()
t.pendown()
t.setheading(120)
t.circle(-28, 160)
t.setheading(210)
t.circle(150, 20)
t.end_fill()
# 左耳内侧
t.penup()
t.goto(90, 230)
t.setheading(40)
t.begin_fill()
t.pendown()
t.circle(-30, 170)
t.setheading(125)
t.circle(150, 23)
t.end_fill()
# 右手内侧
t.penup()
t.goto(-180, -55)
t.fillcolor("black")
t.begin_fill()
t.setheading(-120)
t.pendown()
t.circle(50, 30)
t.circle(-27, 200)
t.circle(-300, 20)
t.setheading(-90)
t.circle(300, 14)
t.end_fill()
# 左腿内侧
t.penup()
t.goto(108, -168)
t.fillcolor("black")
t.begin_fill()
t.pendown()
t.setheading(-115)
t.circle(110, 15)
t.circle(200, 10)
t.circle(-18, 80)
t.circle(-180, 13)
t.circle(-20, 90)
t.circle(15, 60)
t.setheading(42)
t.circle(-200, 29)
t.end_fill()
# 右腿内侧
t.penup()
t.goto(-38, -210)
t.fillcolor("black")
t.begin_fill()
t.pendown()
t.setheading(-155)
t.circle(15, 100)
t.circle(-10, 110)
t.circle(-100, 30)
t.circle(-15, 65)
t.circle(-100, 10)
t.circle(200, 15)
t.setheading(-14)
t.circle(-200, 27)
t.end_fill()
# 左手
t.penup()
t.goto(177, 112)
t.pencolor("lightgray")
t.pensize(3)
t.fillcolor("white")
t.begin_fill()
t.pendown()
t.setheading(80)
t.circle(-45, 200)
t.circle(-300, 23)
t.end_fill()
# 左手内侧
t.penup()
t.goto(182, 95)
t.pencolor("black")
t.pensize(1)
t.fillcolor("black")
t.begin_fill()
t.setheading(95)
t.pendown()
t.circle(-37, 160)
t.circle(-20, 50)
t.circle(-200, 30)
t.end_fill()
# 右眼眼圈
t.penup()
t.goto(-64, 120)
t.begin_fill()
t.pendown()
t.setheading(40)
t.circle(-35, 152)
t.circle(-100, 50)
t.circle(-35, 130)
t.circle(-100, 50)
t.end_fill()
# 右眼眼珠
t.penup()
t.goto(-47, 55)
t.fillcolor("white")
t.begin_fill()
t.pendown()
t.setheading(0)
t.circle(25, 360)
t.end_fill()
t.penup()
t.goto(-45, 62)
t.pencolor("darkslategray")
t.fillcolor("darkslategray")
t.begin_fill()
t.pendown()
t.setheading(0)
t.circle(19, 360)
t.end_fill()
t.penup()
t.goto(-45, 68)
t.fillcolor("black")
t.begin_fill()
t.pendown()
t.setheading(0)
t.circle(10, 360)
t.end_fill()
t.penup()
t.goto(-47, 86)
t.pencolor("white")
t.fillcolor("white")
t.begin_fill()
t.pendown()
t.setheading(0)
t.circle(5, 360)
t.end_fill()
# 左眼眼圈
t.penup()
t.goto(51, 82)
t.fillcolor("black")
t.begin_fill()
t.pendown()
t.setheading(120)
t.circle(-32, 152)
t.circle(-100, 55)
t.circle(-25, 120)
t.circle(-120, 45)
t.end_fill()
# 左眼眼珠
t.penup()
t.goto(79, 60)
t.fillcolor("white")
t.begin_fill()
t.pendown()
t.setheading(0)
t.circle(24, 360)
t.end_fill()
t.penup()
t.goto(79, 64)
t.pencolor("darkslategray")
t.fillcolor("darkslategray")
t.begin_fill()
t.pendown()
t.setheading(0)
t.circle(19, 360)
t.end_fill()
t.penup()
t.goto(79, 70)
t.fillcolor("black")
t.begin_fill()
t.pendown()
t.setheading(0)
t.circle(10, 360)
t.end_fill()
t.penup()
t.goto(79, 88)
t.pencolor("white")
t.fillcolor("white")
t.begin_fill()
t.pendown()
t.setheading(0)
t.circle(5, 360)
t.end_fill()
# 鼻子
t.penup()
t.goto(37, 80)
t.fillcolor("black")
t.begin_fill()
t.pendown()
t.circle(-8, 130)
t.circle(-22, 100)
t.circle(-8, 130)
t.end_fill()
# 嘴巴
t.penup()
t.goto(-15, 48)
t.setheading(-36)
t.begin_fill()
t.pendown()
t.circle(60, 70)
t.setheading(-132)
t.circle(-45, 100)
t.end_fill()
# 彩虹圈
t.penup()
t.goto(-135, 120)
t.pensize(5)
t.pencolor("cyan")
t.pendown()
t.setheading(60)
t.circle(-165, 150)
t.circle(-130, 78)
t.circle(-250, 30)
t.circle(-138, 105)
t.penup()
t.goto(-131, 116)
t.pencolor("slateblue")
t.pendown()
t.setheading(60)
t.circle(-160, 144)
t.circle(-120, 78)
t.circle(-242, 30)
t.circle(-135, 105)
t.penup()
t.goto(-127, 112)
t.pencolor("orangered")
t.pendown()
t.setheading(60)
t.circle(-155, 136)
t.circle(-116, 86)
t.circle(-220, 30)
t.circle(-134, 103)
t.penup()
t.goto(-123, 108)
t.pencolor("gold")
t.pendown()
t.setheading(60)
t.circle(-150, 136)
t.circle(-104, 86)
t.circle(-220, 30)
t.circle(-126, 102)
t.penup()
t.goto(-120, 104)
t.pencolor("greenyellow")
t.pendown()
t.setheading(60)
t.circle(-145, 136)
t.circle(-90, 83)
t.circle(-220, 30)
t.circle(-120, 100)
t.penup()
# 爱心
t.penup()
t.goto(220, 115)
t.pencolor("brown")
t.pensize(1)
t.fillcolor("brown")
t.begin_fill()
t.pendown()
t.setheading(36)
t.circle(-8, 180)
t.circle(-60, 24)
t.setheading(110)
t.circle(-60, 24)
t.circle(-8, 180)
t.end_fill()
t.up()
# BEIJING 2022
t.pencolor("black")
t.goto(-35, -160)
t.write("BEIJING 2022", font=('Arial', 10, 'bold italic'))
# 五环
t.penup()
t.goto(-25, -170)
t.pendown()
t.pencolor("blue")
t.circle(6)
t.penup()
t.goto(-10, -170)
t.pendown()
t.pencolor("black")
t.circle(6)
t.penup()
t.goto(5, -170)
t.pendown()
t.pencolor("brown")
t.circle(6)
t.penup()
t.goto(-18, -175)
t.pendown()
t.pencolor("lightgoldenrod")
t.circle(6)
t.penup()
t.goto(-4, -175)
t.pendown()
t.pencolor("green")
t.circle(6)
t.penup()
t.hideturtle()  # 隐藏画笔

t.done()  # 循环消息
评论