今晚的平安夜,明天的圣诞节,祝大家平安夜开心,圣诞节快乐,祝明天考研的学子考神附体,Merry Christmas!
2021即将走进尾声,愿你喜欢的都拥有,失去的都释怀,祝你平安喜乐,心想事成
先来看看圣诞树效果吧
画苹果
goto(0, 150)
turtle.begin_fill()
turtle.color("red")
turtle.circle(radius=30)
turtle.end_fill()
turtle.color("brown")
turtle.pu()
turtle.goto(-15, 190)
turtle.pd()
turtle.circle(36, 40)
turtle.pu()
turtle.seth(105)
turtle.goto(-1, 194)
turtle.pd()
turtle.circle(36, 50)
turtle.pd()
turtle.begin_fill()
turtle.color("green")
turtle.circle(36, 50)
turtle.seth(-30)
turtle.circle(36, 55)
turtle.end_fill()
turtle.begin_fill()
turtle.color("green")
turtle.seth(0)
turtle.circle(36, 50)
turtle.seth(-180)
turtle.circle(36, 50)
turtle.end_fill()
penup()
画圣诞树
seth(-120)
for i in range(10):
fd(12)
right(2)
penup()
goto(0, 150)
seth(-60)
pendown()
for i in range(10):
fd(12)
left(2)
seth(-150)
penup()
fd(10)
pendown()
for i in range(5):
fd(10)
right(15)
seth(-150)
penup()
fd(8)
pendown()
for i in range(5):
fd(10)
right(15)
seth(-155)
penup()
fd(5)
pendown()
for i in range(5):
fd(7)
right(15)
penup()
goto(-55, 34)
pendown()
seth(-120)
for i in range(10):
fd(8)
right(5)
penup()
goto(50, 35)
seth(-60)
pendown()
for i in range(10):
fd(8)
left(5)
seth(-120)
penup()
fd(10)
seth(-145)
pendown()
for i in range(5):
fd(10)
right(15)
penup()
fd(10)
seth(-145)
pendown()
for i in range(5):
fd(12)
right(15)
penup()
fd(8)
seth(-145)
pendown()
for i in range(5):
fd(10)
right(15)
penup()
seth(-155)
fd(8)
pendown()
for i in range(5):
fd(11)
right(15)
penup()
goto(-100, -40)
seth(-120)
pendown()
for i in range(10):
fd(6)
right(3)
penup()
goto(80, -39)
seth(-50)
pendown()
for i in range(10):
fd(6)
left(3)
seth(-155)
penup()
fd(10)
pendown()
for i in range(5):
fd(8)
right(10)
penup()
fd(8)
seth(-145)
pendown()
for i in range(7):
fd(8)
right(10)
penup()
fd(8)
seth(-145)
pendown()
for i in range(7):
fd(7)
right(10)
penup()
fd(8)
seth(-145)
pendown()
for i in range(7):
fd(7)
right(10)
penup()
fd(8)
seth(-140)
pendown()
for i in range(7):
fd(6)
right(10)
penup()
goto(-120, -95)
seth(-130)
pendown()
for i in range(7):
fd(10)
right(5)
penup()
goto(100, -95)
seth(-50)
pendown()
for i in range(7):
fd(10)
left(5)
penup()
seth(-120)
fd(10)
seth(-155)
pendown()
for i in range(6):
fd(8)
right(10)
penup()
seth(-160)
fd(10)
seth(-155)
pendown()
for i in range(6):
fd(8)
right(10)
penup()
seth(-160)
fd(10)
seth(-155)
pendown()
for i in range(6):
fd(8)
right(10)
penup()
seth(-160)
fd(10)
seth(-160)
pendown()
for i in range(6):
fd(8)
right(10)
penup()
seth(-160)
fd(10)
seth(-160)
pendown()
for i in range(6):
fd(8)
right(10)
penup()
seth(-160)
fd(10)
seth(-165)
pendown()
for i in range(5):
fd(10)
right(11)
画树干
pencolor("#8B4513")
penup()
goto(-70, -165)
seth(-85)
pendown()
for i in range(3):
fd(5)
left(3)
penup()
goto(70, -165)
seth(-95)
pendown()
for i in range(3):
fd(5)
right(3)
seth(-170)
penup()
fd(10)
pendown()
pendown()
for i in range(10):
fd(12)
right(2)
画蝴蝶结
def hdj(x, y):
penup()
pencolor("#f799e6")
goto(x, y)
seth(80)
pendown()
pensize(2)
circle(5)
seth(10)
fd(15)
seth(120)
fd(20)
seth(240)
fd(20)
seth(180)
fd(20)
seth(-60)
fd(20)
seth(50)
fd(20)
seth(-40)
fd(30)
seth(-130)
fd(5)
seth(135)
fd(30)
seth(-60)
fd(30)
seth(-150)
fd(6)
seth(110)
fd(30)
def uit(x, y):
penup()
pencolor("#f799e6")
goto(x, y)
pendown()
pensize(2)
circle(5)
seth(-10)
fd(15)
seth(90)
fd(15)
seth(200)
fd(15)
seth(160)
fd(15)
seth(-90)
fd(15)
seth(10)
fd(15)
seth(-60)
fd(20)
seth(-180)
fd(5)
seth(110)
fd(20)
seth(-90)
fd(20)
seth(-180)
fd(6)
seth(70)
fd(15)
hideturtle()
seth(0)
uit(40, -150)
hdj(-80, -110)
yut(-67, -105, 120)
yut(-86, -113, 150)
hdj(40, -40)
yut(52, -35, 130)
yut(34, -45, 160)
seth(0)
uit(-20, -50)
yut(-4, -50, 100)
yut(-20, -50, 120)
hdj(-30, 30)
yut(-15, 35, 130)
yut(-40, 30, 180)
uit(30, 70)
yut(45, 70, 100)
yut(30, 70, 120)
def iou(x, y, z):
penup()
goto(x, y)
pencolor("red")
pendown()
seth(z)
for po in range(10):
fd(4)
left(18)
seth(-20)
pensize(2)
penup()
goto(-30, -120)
pencolor("white")
pendown()
fillcolor("white")
begin_fill()
fd(30)
circle(4, 180)
fd(30)
circle(4, 180)
end_fill()
penup()
goto(-25, -115)
seth(75)
pendown()
fillcolor("red")
begin_fill()
for i in range(5):
fd(6)
right(20)
seth(-10)
for i in range(5):
fd(8)
right(15)
seth(145)
for i in range(5):
fd(5)
left(2)
seth(90)
for i in range(5):
fd(1)
left(2)
seth(-90)
for i in range(4):
fd(4)
right(6)
seth(161)
fd(30)
end_fill()
pensize(1)
pencolor("white")
def koc(x, y, size):
pensize(2)
pencolor("yellow")
penup()
goto(x, y)
pendown()
begin_fill()
fillcolor("yellow")
for i in range(5):
left(72)
fd(size)
right(144)
fd(size)
end_fill()
画星星
seth(-15)
koc(-120, -70, 10)
seth(10)
koc(100, -20, 10)
seth(-10)
koc(10, 40, 10)
seth(30)
koc(-80, 60, 10)
koc(100, -150, 10)
koc(-140, -150, 10)
koc(80, -100, 10)
def koc(x, y, size):
pensize(2)
pencolor("yellow")
penup()
goto(x, y)
pendown()
begin_fill()
fillcolor("yellow")
for i in range(5):
left(72)
fd(size)
right(144)
fd(size)
end_fill()
seth(-15)
koc(-120, -70, 10)
seth(10)
koc(100, -20, 10)
seth(-10)
koc(10, 40, 10)
seth(30)
koc(-80, 60, 10)
koc(100, -150, 10)
koc(-140, -150, 10)
koc(80, -100, 10)
画动态雪花
screen.delay(0)
t = Turtle(visible=False, shape='circle')
t.pencolor("white")
t.fillcolor("white")
t.penup()
t.setheading(-90)
t.goto(r.randint(-width / 2, width / 2), height / 2)
stars = []
for i in range(200):
star = t.clone()
s = r.random() / 3
star.shapesize(s, s)
star.speed(int(s * 10))
star.setx(r.randint(-width / 2, width / 2))
star.sety(height / 2 + r.randint(1, height))
star.showturtle()
stars.append(star)
while True:
for star in stars:
star.sety(star.ycor() - 8 * star.speed())
if star.ycor() < -height / 2:
star.hideturtle()
star.setx(r.randint(-width / 2, width / 2))
star.sety(height / 2 + r.randint(1, height))
star.showturtle()
hideturtle()
done()
感性与理性的交织,迷茫与坚定的纵横,业余与专业的并行,追梦我伴你前行
源码可到"一团追梦喵"发送"圣诞树"即可,发送"玫瑰花",也会有惊喜呦!
悄悄告诉你们,小编的圣诞祝福是看到这段话的宝贝:暴富,恋爱,平安,幸福。