when your object wants a christmas tree

I. Introduction

When your object wants a Christmas tree,
you know what i mean.jpeg
the romance is exclusive to him.
image.png
Send a Christmas tree to your favorite person.

2. Creative name

Merry Christmas for You

3. Effect display

image.png

4. Implementation steps

The color, background, and greetings of the Christmas tree can all be DIY, and comments are thoughtfully added to the code.
image.png

Define blessing

slogan = "Merry Christmas for You"

Define background color and brush speed

speed("fastest")  # 定义速度
screensize(bg='black')  # 定义背景颜色,可以自己换颜色

Define canvas size, brush color

setup(600, 600, startx=None, starty=None)
speed(0)
pencolor("#008500")
pensize(10)
penup()

Position the brush, ready to start drawing

hideturtle()
goto(0, 150)
showturtle()
pendown()
shape(name="classic")

painted branches

# 树枝
guest(-70, -150, 160)
guest(100, -150, 160)
guet(110, -110, 50)
guest(160, -140, 150)
qu(80, -120, 180)
guest(70, -85, 165)
guest(-40, -85, 165)
guet(90, -50, 50)
guest(130, -80, 150)
pencolor("#00cc00")

small bow

# 小蝴蝶结
seth(0)
uit(40, -160)
hdj(-80, -120)
yut(-67, -115, 120)
yut(-86, -123, 150)
hdj(40, -50)
yut(52, -45, 130)
yut(34, -55, 160)
seth(0)
pencolor("pink")

Follow and reply **「Christmas Tree」** to get all the codes~

Guess you like

Origin blog.csdn.net/shuofxz/article/details/128438489