首页 > 其他 > 详细

玫瑰绘制(结对作业)

时间:2017-10-22 23:15:05      阅读:282      评论:0      收藏:0      [点我收藏+]
import turtle
turtle.setup(0.5,0.5,300,100)
turtle.penup()
turtle.goto(0,100)

turtle.begin_fill()
turtle.fillcolor("red")
turtle.pendown()
turtle.circle(5,180)
turtle.speed(9)
turtle.circle(20,70)
turtle.seth(-45)
turtle.speed(0)
turtle.circle(20,130)
turtle.speed(1)
turtle.circle(9,90)
turtle.speed(0)
turtle.circle(40,70)
turtle.seth(-90)
turtle.fd(30)
turtle.seth(105)
turtle.fd(20)
turtle.seth(-100)
turtle.circle(80,75)
turtle.seth(30)
turtle.circle(90,80)
turtle.seth(-125)
turtle.fd(15)
turtle.right(90)
turtle.circle(100,15)
turtle.speed(0)
turtle.seth(-60)
turtle.end_fill()

turtle.circle(130,14)
turtle.penup()
turtle.goto(40,95)
turtle.right(70)
turtle.pendown()
turtle.circle(-120,8)
turtle.speed(1)
turtle.circle(-70,30)
turtle.speed(0)
turtle.circle(30,150)
turtle.penup()
turtle.goto(-32,65)
turtle.pendown()
turtle.right(60)
turtle.circle(80,30)
turtle.circle(-30,80)
turtle.speed(1)
turtle.circle(100,60)
turtle.circle(-130,40)

turtle.speed(0)
turtle.right(180)
turtle.circle(130,40)
turtle.pendown()
turtle.circle(-100,30)

turtle.speed(0)
turtle.right(90)
turtle.begin_fill()
turtle.fillcolor("green")
turtle.circle(80,40)
turtle.right(180)
turtle.circle(-80,30)
turtle.right(120)
turtle.circle(-40,100)
turtle.right(80)
turtle.circle(-40,100)
turtle.end_fill()

turtle.penup()
turtle.goto(19,-105)
turtle.pendown()
turtle.begin_fill()
turtle.fillcolor("green")

turtle.right(-30)
turtle.circle(-80,35)
turtle.right(180)
turtle.circle(80,23)
turtle.right(-120)
turtle.circle(40,100)
turtle.right(60)
turtle.right(-140)
turtle.circle(40,100)
turtle.end_fill()
turtle.exitonclick()

 技术分享

玫瑰绘制(结对作业)

原文:http://www.cnblogs.com/zfwins/p/7712150.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!