使用python绘制爱心
2021-01-15 22:12
标签:def end port hid ide range code bsp png 是一个动态的绘制过程 使用python绘制爱心 标签:def end port hid ide range code bsp png 原文地址:https://www.cnblogs.com/cyx-b/p/12934335.htmlimport turtle
turtle.bgcolor("black")
turtle.pensize(2)
sizeh = 1.2
def curve():
for ii in range(200):
turtle.right(1)
turtle.forward(1 * sizeh)
turtle.speed(0)
turtle.color("red", "red")
turtle.begin_fill()
turtle.left(140)
turtle.forward(111.65 * sizeh)
curve()
turtle.left(120)
curve()
turtle.forward(111.65 * sizeh)
turtle.end_fill()
turtle.hideturtle()