1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
import os
import time
import pygame
import turtle as t
print('播放音乐')
pygame.mixer.init()
pygame.mixer.music.load(r"F:公众号62.玫瑰花Eran - 春の思い出.mp3")
pygame.mixer.music.set_volume(0.5)
pygame.mixer.music.play(1, 10)
t.title('阿黎逸阳的代码公众号')
t.speed(3)
t.setup(startx=0, starty = 0, width=800, height = 600)
def red_heart():
t.penup()
t.goto(0, 200)
t.pendown()
t.pensize(2)
t.color('black', 'red')
t.begin_fill()
t.setheading(110)
t.circle(30, 150)
t.left(15)
t.circle(50, 70)
t.circle(-50, 30)
t.left(100)
t.circle(-50, 30)
t.right(10)
t.circle(50, 70)
t.left(5)
t.circle(29, 175)
t.end_fill()
def top_arc():
t.penup()
t.goto(18, 224)
t.pendown()
t.begin_fill()
t.setheading(125)
t.pensize(2)
t.color('black', 'red')
t.circle(25, 125)
t.color('red')
t.circle(25, 360-125)
t.end_fill()
def under_arc():
t.penup()
t.goto(-58, 190)
t.pendown()
t.begin_fill()
t.color('black', 'red')
t.setheading(290)
t.circle(-120, 50)
t.circle(60, 120)
t.setheading(-10)
t.circle(60, 120)
t.left(4)
t.circle(-120, 50)
t.end_fill()
def stamen():
t.penup()
t.goto(0, 185)
t.pendown()
t.setheading(90)
t.circle(5, 270)
t.right(5)
t.circle(100, 8)
t.circle(10, 180)
t.circle(100, 8)
t.right(10)
t.circle(15, 160)
t.circle(80, 5)
t.right(34)
t.circle(-30, 80)
t.right(10)
t.circle(100, 82)
t.penup()
t.goto(-10, 183)
t.pendown()
t.setheading(-90)
t.forward(15)
t.penup()
t.goto(-21, 179)
t.pendown()
t.setheading(-90)
t.forward(25)
t.penup()
t.goto(18, 185)
t.pendown()
t.setheading(-90)
t.forward(29)
print('画心')
red_heart()
print('画顶部弧线')
top_arc()
print('画下弧线')
under_arc()
print('画心')
red_heart()
print('画花蕊')
stamen()
t.hideturtle()
t.penup()
t.goto(-200, -200)
t.pendown()
t.write("赠给亲爱的 XXnn", align="right", font=("楷体", 16, "bold"))
t.penup()
t.goto(-200, -200)
t.pendown()
t.write("from XXX", align="right", font=("楷体", 12, "normal"))
相关知识
HTML5七夕情人节表白网页(玫瑰花表白) HTML+CSS+JS
python表白玫瑰花绘制——情人节表白
python表白玫瑰花绘制——情人节表白(亲测)
MATLAB绘制玫瑰花表白神器:酷炫十行代码
用Python绘制立体玫瑰花表白,真的可行吗?
python浪漫表白,表白代码——绘制3D玫瑰花
python绘制玫瑰花情人节表白
MATLAB表白玫瑰花绘制——旋转玫瑰、蓝色玫瑰
七夕表白唯美治愈浪漫梦幻情人节玫瑰花插画图片
七夕鲜花表白贺卡 七夕鲜花贺卡
网址: Python+turtle绘制七夕表白玫瑰花 https://m.huajiangbk.com/newsview2586777.html
| 上一篇: 七夕送花送什么花潮汕 |
下一篇: 为什么七夕节又名乞巧节 民间林林 |