玫瑰花

最终运行截图如下:

代码如下:

import turtle
turtle.setup(400,800)
turtle.penup()
turtle.left(90)
turtle.fd(200)
turtle.pendown()
turtle.right(90)
turtle.circle(80,45)
#第一个弧形
turtle.left(130)
turtle.circle(160,45)
#第二个弧形
turtle.left(120)
turtle.circle(200,45)
#第三个弧形
turtle.fillcolor('red')
turtle.begin_fill()
turtle.right(120)
turtle.fd(60)
turtle.right(60)
turtle.circle(120,60)
#第四个向下的弧形
turtle.left(120)
turtle.circle(200,60)
#第五个向上的大弧形
turtle.left(120)
turtle.circle(80,60)
#第六个向下的小弧形
turtle.right(105)
turtle.fd(160)
turtle.seth(-70)
turtle.fd(125)
turtle.left(65)
turtle.circle(-45,80)
#第二片花瓣向下小弧
turtle.seth(150)
turtle.circle(-200,30)
#第二片花瓣向上大弧
turtle.seth(-60)
turtle.circle(60,60)
turtle.end_fill()
#画完花瓣部分
turtle.penup()
turtle.right(65)
turtle.fd(48)
turtle.pendown()
#停到花萼处
turtle.right(60)
turtle.circle(300,45)
#上半截花梗
turtle.seth(90)
turtle.fillcolor('green')
turtle.begin_fill()
turtle.circle(-100,90)
turtle.seth(-90)
turtle.circle(-100,90)
turtle.end_fill()
turtle.seth(45)
turtle.fd(90)
turtle.seth(-135)
turtle.fd(90)
#第一片叶子
turtle.seth(-90)
turtle.circle(-300,45)
#下半截花梗
turtle.penup()
turtle.seth(58)
turtle.fd(120)
turtle.pendown()
#起笔落笔将第二片叶子移上去
turtle.fillcolor('green')
turtle.begin_fill()
turtle.seth(90)
turtle.circle(120,90)
turtle.seth(-90)
turtle.circle(120,90)
turtle.end_fill()
turtle.seth(130)
turtle.fd(100)
turtle.seth(-50)
turtle.fd(100)
#第二片叶子

 

posted @ 2017-10-30 22:00  77677  阅读(117)  评论(0编辑  收藏  举报