1. 程式人生 > >python繪制玫瑰

python繪制玫瑰

玫瑰 pytho red fill turtle pen right imp begin

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繪制玫瑰