码迷,mamicode.com
首页 > 其他好文 > 详细

漂亮的玫瑰花

时间:2017-10-27 01:33:12      阅读:162      评论:0      收藏:0      [点我收藏+]

标签:技术   gre   玫瑰花   png   es2017   highlight   exit   cli   .com   

import turtle
turtle.setup(0.75,0.75,0,0)
turtle.begin_fill()
turtle.fillcolor("red")#花瓣上色
turtle.circle(20,70)
turtle.seth(150)
turtle.circle(30,90)
turtle.seth(-30)
turtle.circle(38,90)
turtle.seth(140)
turtle.circle(40,100)
turtle.seth(-85)
turtle.fd(30)
turtle.seth(140)
turtle.fd(15)
turtle.seth(-120)
turtle.circle(50,135)
turtle.seth(30)
turtle.circle(70,85)
turtle.seth(-130)

turtle.fd(10)
turtle.seth(90)
turtle.circle(25,54)
turtle.end_fill ()#结束涂色
turtle.seth(-80)
turtle.fd(30)
turtle.left(135)
turtle.fd(15)
turtle.left(-180)
turtle.fd(50)
turtle.circle(50,60)
turtle.left(150)
turtle.circle(75,64)
#花瓣
turtle.penup()
turtle.seth(270)
turtle.fd(70)
turtle.seth(0)
turtle.fd(37)
turtle.pendown ()
turtle.seth(-110)
turtle.circle(120,50)
turtle.begin_fill()
turtle.fillcolor("green")#叶子上色
turtle.fd(80)
turtle.left(180)
turtle.fd(50)
turtle.seth(180)
turtle.fd(20)
turtle.fd(30)
turtle.seth(0)
turtle.fd(30)
turtle.seth(130)
turtle.circle(40,100)
turtle.seth(-50)
turtle.circle(40,100)
turtle.seth(0)
turtle.fd(20)
turtle.penup()
turtle.seth(122)
turtle.fd(25)
turtle.pendown()
turtle.seth(30)
turtle.fd(20)
turtle.fd(30)
turtle.seth(-150)
turtle.fd(30)
turtle.seth(-25)
turtle.circle(40,100)
turtle.seth(160)
turtle.circle(40,100)
turtle.end_fill ()#结束涂色
turtle.exitonclick()

  技术分享

漂亮的玫瑰花

标签:技术   gre   玫瑰花   png   es2017   highlight   exit   cli   .com   

原文地址:http://www.cnblogs.com/zhmd/p/7739985.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!