龙空技术网

Python编写雪融融!(附教程源码)

可以叫我勺哥—掌勺 163

前言:

眼前各位老铁们对“蚂蚁算法python的代码”大概比较看重,各位老铁们都需要分析一些“蚂蚁算法python的代码”的相关资讯。那么小编在网络上收集了一些有关“蚂蚁算法python的代码””的相关知识,希望同学们能喜欢,朋友们一起来了解一下吧!

上期给大家出了一个利用python绘制冬奥吉祥物“冰墩墩”的教程!也有很多粉丝找我拿源码!让大家实现一户一墩!

这期给大家出一个利用python绘制冬奥吉祥物“雪容融”的教程!

原理跟写冰墩墩一样的!闲话少说!先看效果图

Python版“雪容融”

由于代码比较长!现在给大家展示主要核心代码!源码关注掌勺,私信,上教程

视频

Python全栈开发入门课

蚂蚁学Python

¥39

购买专栏

大头的圈圈

turtle.penup()

turtle.goto(-145, 135)

turtle.pensize(10)

turtle.pencolor("#BB3529")

turtle.fillcolor("#DA2D20")

turtle.begin_fill()

turtle.pendown()

turtle.setheading(45)

turtle.circle(-150, 45)

turtle.forward(80)

turtle.circle(-150, 180)

turtle.forward(80)

turtle.circle(-150, 135)

turtle.end_fill()

花纹

turtle.fillcolor("#FF9300")

turtle.begin_fill()

turtle.pensize(5)

turtle.setheading(15)

turtle.circle(-600, 28)

turtle.pencolor("#FF9300")

turtle.right(30)

turtle.circle(-150, -35)

turtle.setheading(180)

turtle.forward(100)

turtle.circle(150, 42)

turtle.end_fill()

turtle.pencolor("#DA2D20")

turtle.penup()

turtle.goto(-100, 160)

turtle.fillcolor("#DA2D20")

turtle.begin_fill()

turtle.pendown()

turtle.circle(4, 360)

turtle.end_fill()

turtle.penup()

turtle.goto(-40, 169)

turtle.fillcolor("#DA2D20")

turtle.begin_fill()

turtle.pendown()

turtle.circle(4, 360)

turtle.end_fill()

脸部

turtle.pensize(8)

turtle.pencolor("#BB3529")

turtle.penup()

turtle.goto(-125, 40)

turtle.setheading(216)

turtle.fillcolor("white")

turtle.begin_fill()

turtle.pendown()

turtle.circle(34, 170)

turtle.right(60)

turtle.circle(170, 63)

turtle.right(60)

turtle.circle(32, 158)

turtle.right(65)

turtle.circle(34, 157)

turtle.circle(-15, 155)

turtle.left(30)

turtle.circle(36, 127)

turtle.circle(-15, 45)

turtle.right(38)

turtle.circle(36, 107)

turtle.circle(-15, 55)

turtle.right(22)

turtle.circle(32, 120)

turtle.end_fill()

左边

turtle.pencolor("#F44F39")

turtle.penup()

turtle.goto(-120, 5)

turtle.fillcolor("#F44F39")

turtle.begin_fill()

turtle.pendown()

turtle.circle(15, 360)

turtle.end_fill()

右边

turtle.penup()

turtle.goto(85, 0)

turtle.fillcolor("#F44F39")

turtle.begin_fill()

turtle.pendown()

turtle.circle(15, 360)

turtle.end_fill()

眼睛

turtle.pensize(1)

右黑

turtle.pencolor("#534A49")

turtle.penup()

turtle.goto(65, 35)

turtle.fillcolor("#534A49")

turtle.begin_fill()

turtle.pendown()

turtle.setheading(90)

turtle.circle(9, 180)

turtle.forward(9)

turtle.circle(9, 180)

turtle.forward(9)

turtle.end_fill()

右白

turtle.penup()

turtle.pencolor("white")

turtle.goto(57, 36)

turtle.fillcolor("white")

turtle.begin_fill()

turtle.pendown()

turtle.setheading(90)

turtle.circle(3, 360)

turtle.end_fill()

左黑

turtle.pencolor("#534A49")

turtle.penup()

turtle.goto(-51, 35)

turtle.fillcolor("#534A49")

turtle.begin_fill()

turtle.pendown()

turtle.setheading(90)

turtle.circle(9, 180)

turtle.forward(9)

turtle.circle(9, 180)

turtle.forward(9)

turtle.end_fill()

左白

turtle.penup()

turtle.pencolor("white")

turtle.goto(-58, 36)

turtle.fillcolor("white")

turtle.begin_fill()

turtle.pendown()

turtle.setheading(90)

turtle.circle(3, 360)

turtle.end_fill()

头顶

turtle.pensize(5)

turtle.penup()

turtle.pencolor("#5FA8D2")

turtle.goto(-108, 170)

turtle.fillcolor("white")

turtle.begin_fill()

turtle.pendown()

turtle.setheading(24)

turtle.forward(70)

turtle.left(15)

turtle.circle(-68, 80)

turtle.left(22)

turtle.forward(78)

turtle.circle(-4, 175)

turtle.forward(40)

turtle.right(22)

turtle.circle(24, 62)

turtle.circle(-34, 62)

turtle.circle(34, 75)

turtle.circle(-34, 62)

turtle.circle(24, 72)

turtle.right(30)

turtle.forward(24)

turtle.circle(-4, 180)

turtle.forward(4)

turtle.end_fill()

皇冠

turtle.pensize(5)

turtle.setheading(0)

turtle.penup()

turtle.pencolor("#E7A910")

turtle.goto(-15, 225)

turtle.fillcolor("white")

turtle.begin_fill()

turtle.pendown()

turtle.circle(-7, 260)

turtle.left(70)

turtle.circle(-11, 180)

turtle.left(52)

turtle.circle(-27, 93)

turtle.left(62)

turtle.circle(-10, 180)

turtle.left(70)

turtle.circle(-7, 260)

turtle.setheading(-135)

turtle.forward(15)

turtle.right(90)

turtle.forward(10)

turtle.left(90)

turtle.forward(10)

turtle.end_fill()

左手

turtle.pensize(6)

turtle.penup()

turtle.pencolor("#BB3529")

turtle.goto(-60, -135)

turtle.fillcolor("#DA2D20")

turtle.begin_fill()

turtle.pendown()

turtle.setheading(150)

turtle.forward(50)

turtle.circle(25,110)

turtle.circle(32,90)

turtle.circle(332,10)

turtle.end_fill()

右手

turtle.pensize(6)

turtle.penup()

turtle.pencolor("#BB3529")

turtle.goto(80, -125)

turtle.fillcolor("#DA2D20")

turtle.begin_fill()

turtle.pendown()

turtle.setheading(-30)

turtle.forward(50)

turtle.circle(-25,110)

turtle.circle(-32,90)

turtle.end_fill()

左脚

turtle.pensize(6)

turtle.penup()

turtle.pencolor("#BB3529")

turtle.goto(-65, -225)

turtle.fillcolor("#DA2D20")

turtle.begin_fill()

turtle.pendown()

turtle.setheading(-70)

turtle.forward(40)

turtle.circle(10,40)

turtle.circle(55,40)

turtle.circle(10,70)

turtle.forward(25)

turtle.end_fill()

右脚

turtle.pensize(6)

turtle.penup()

turtle.pencolor("#BB3529")

turtle.goto(70, -225)

turtle.fillcolor("#DA2D20")

turtle.begin_fill()

turtle.pendown()

turtle.setheading(-110)

turtle.forward(40)

turtle.circle(-10,40)

turtle.circle(-50,40)

turtle.circle(-10,70)

turtle.forward(25)

turtle.end_fill()

标签: #蚂蚁算法python的代码 #python文学编程