码迷,mamicode.com
首页 > 编程语言 > 详细

python绘制玫瑰

时间:2017-10-24 14:03:10      阅读:208      评论:0      收藏:0      [点我收藏+]

标签:import   imp   绘制   port   down   pen   tle   gre   turtle   

import turtle

turtle.fillcolor("red")
turtle.begin_fill()

turtle.circle(10,180)
turtle.circle(25,100)
turtle.left(60)
turtle.circle(100,30)
turtle.circle(20,180)
turtle.right(30)
turtle.circle(100,30)
turtle.circle(50,70)

turtle.left(10)
turtle.fd(30)

turtle.right(160)
turtle.fd(15)

turtle.left(150)
turtle.circle(90,100)

turtle.left(40)
turtle.circle(110,73)


turtle.end_fill()


turtle.left(140)
turtle.circle(-80,60)
turtle.left(40)
turtle.circle(45,120)

turtle.left(90)
turtle.circle(60,90)
turtle.circle(-46,55)


turtle.penup()
turtle.right(163)
turtle.fd(125)
turtle.right(40)
turtle.pendown()
turtle.circle(200,10)


turtle.left(90)
turtle.fd(15)
turtle.left(60)

turtle.fillcolor("green")
turtle.begin_fill()
turtle.circle(-30,45)
turtle.circle(-30,60)
turtle.right(80)
turtle.circle(-30,65)
turtle.circle(-32,32)
turtle.end_fill()

turtle.right(130)
turtle.fd(30)

turtle.penup()
turtle.left(180)
turtle.fd(47)
turtle.pendown()
turtle.left(90)
turtle.circle(-200,20)

turtle.right(110)
turtle.fd(15)
turtle.fillcolor("green")
turtle.begin_fill()
turtle.circle(30,45)
turtle.circle(30,45)
turtle.left(90)
turtle.circle(30,45)
turtle.right(20)
turtle.circle(60,35)
turtle.end_fill()
turtle.left(150)
turtle.fd(30)

turtle.penup()
turtle.left(180)
turtle.fd(26)
turtle.right(90)
turtle.pendown()
turtle.circle(200,60)

python绘制玫瑰

标签:import   imp   绘制   port   down   pen   tle   gre   turtle   

原文地址:http://www.cnblogs.com/shenmoubiexv/p/7723006.html

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