1. 程式人生 > >繪制玫瑰花(周嶺&金宇)

繪制玫瑰花(周嶺&金宇)

技術分享 amp down images rtl gin tle 玫瑰花 分享

技術分享

import turtle

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

turtle.circle(15,180)
turtle.circle(30,180)
turtle.circle(45,240)
turtle.left(-10)
turtle.circle(100,30)
turtle.left(30)
turtle.fd(10)
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)

繪制玫瑰花(周嶺&金宇)