Happy new year!
一元复始,万象更新。祝大家新的一年顺心顺意,虎虎生威!

心有猛虎,细嗅蔷薇。愿岁月静好,平安吉祥。
In me, past, present, future meet,
To hold long chiding conference.
My lusts usurp the present tense
And strangle Reason in his seat.
My loves leap through the future's fence
To dance with dream-enfranchised feet.
In me the cave-man clasps the seer,
And garlanded Apollo goes
Chanting to Abraham's deaf ear.
In me the tiger sniffs the rose.
Look in my heart, kind friends, and tremble,
Since there your elements assemble.
from turtle import *
bgcolor('wheat')
#起笔位置
up()
lt(90)
fd(200)
down()
rt(90)
#花蕊
width(2)
color('tomato')
fillcolor("red")
begin_fill()
circle(10,180)
circle(25,110)
lt(50)
circle(60,45)
circle(20,170)
rt(24)
fd(30)
lt(10)
circle(30,110)
fd(20)
lt(40)
circle(90,70)
circle(30,150)
rt(30)
fd(15)
circle(80,90)
lt(15)
fd(45)
rt(165)
fd(20)
lt(155)
circle(150,80)
lt(50)
circle(150,90)
end_fill()
#花瓣1
width(2)
color('tomato')
lt(150)
circle(-90,70)
lt(20)
circle(75,105)
seth(60)
circle(80,98)
circle(-90,40)
#花瓣2
width(2)
color('tomato')
lt(180)
circle(90,40)
circle(-80,98)
seth(-83)
width(4)
color('green')
fd(60)
lt(115)
#叶子1
width(1)
color('green')
fd(25)
lt(45)
fillcolor("forestgreen")
begin_fill()
circle(-80,90)
rt(90)
circle(-80,90)
end_fill()
width(5)
color('green')
rt(135)
fd(60)
lt(180)
fd(85)
lt(65)
fd(80)
#叶子2
width(1)
color('darkgreen')
rt(110)
fd(25)
rt(45)
fillcolor("green")
begin_fill()
circle(100,90)
lt(90)
circle(100,90)
end_fill()
width(6)
color('darkgreen')
lt(135)
fd(80)
lt(180)
fd(105)
rt(70)
circle(200,60)
ht()

这篇博客通过Python的Turtle模块创作了一幅精美的花朵图形,展现了编程与艺术的结合。作者使用不同颜色和线条宽度,绘制了花蕊和花瓣,并添加了绿色的叶子作为点缀,整体构成了一幅生动的花朵图像。
1285

被折叠的 条评论
为什么被折叠?



