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

绘制玫瑰花

时间:2017-10-25 21:31:26      阅读:185      评论:0      收藏:0      [点我收藏+]

标签:enc   eth   log   绘制   nbsp   bsp   span   circle   fill   

import turtle
turtle.setup(1000,800,200,200)
turtle.speed(5)
turtle.begin_fill()
turtle.circle(40,60)
turtle.seth(120)
turtle.circle(40,50)
turtle.left(15)
turtle.circle(40,80)
turtle.left(15)
turtle.circle(30,50)
turtle.left(10)
turtle.circle(30,60)
turtle.right(5)
turtle.fd(20)
turtle.speed(20)
turtle.circle(30,100)
turtle.left(10)
turtle.circle(70,110)
turtle.right(5)
turtle.fd(10)
turtle.left(20)
turtle.fd(50)
turtle.seth(120)  #1
turtle.fd(30)
turtle.seth(-120)
turtle.circle(160,125)
turtle.seth(25)
turtle.circle(160,60)
turtle.circle(160,50)
turtle.fd(25)      #2
turtle.seth(-120)
turtle.speed(30)
turtle.fd(35)
turtle.seth(110)
turtle.circle(80,35)
turtle.color("red")
turtle.end_fill()
turtle.pencolor("black")
turtle.seth(-75)
turtle.fd(80)
turtle.seth(56)
turtle.circle(60,45)
turtle.seth(-100)
turtle.penup()
turtle.fd(45)
turtle.pendown()
turtle.seth(-160)
turtle.circle(90,90)
turtle.fd(50)
turtle.circle(60,60)
turtle.seth(90)
turtle.speed(10)
turtle.circle(200,48)
turtle.penup()
turtle.fd(100)
turtle.seth(-150)
turtle.fd(12)
turtle.pendown()
turtle.seth(-80)
turtle.circle(80,90)
turtle.penup()
turtle.seth(-68)
turtle.fd(158)
turtle.pendown()
turtle.circle(200,90)
turtle.penup()
turtle.seth(170)
turtle.fd(210)
turtle.seth(45)
turtle.speed(40)
turtle.pendown()
turtle.fd(20)
turtle.begin_fill()
turtle.seth(15)
turtle.circle(90,90)
turtle.seth(-165)
turtle.circle(90,90)
turtle.color("green")
turtle.end_fill()
turtle.penup()
turtle.seth(180)
turtle.fd(30)
turtle.pendown()
turtle.fd(20)
turtle.begin_fill()
turtle.seth(165)
turtle.circle(90,90)
turtle.seth(-15)
turtle.circle(90,90)
turtle.color("green")
turtle.end_fill()
turtle.seth(180)
turtle.circle(40,60)
turtle.done()

 

绘制玫瑰花

标签:enc   eth   log   绘制   nbsp   bsp   span   circle   fill   

原文地址:http://www.cnblogs.com/HKSTUDY/p/7732026.html

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