代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import 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()
|
效果图
以上就是python 动态绘制爱心的示例的详细内容,更多关于python 绘制爱心的资料请关注服务器之家其它相关文章!
原文链接:https://www.cnblogs.com/cyx-b/p/12934335.html