1. 程式人生 > >玫瑰繪制(結對作業)

玫瑰繪制(結對作業)

img http fill set highlight .cn brush right tle

import turtle
turtle.setup(0.5,0.5,300,100)
turtle.penup()
turtle.goto(0,100)

turtle.begin_fill()
turtle.fillcolor("red")
turtle.pendown()
turtle.circle(5,180)
turtle.speed(9)
turtle.circle(20,70)
turtle.seth(-45)
turtle.speed(0)
turtle.circle(20,130)
turtle.speed(1)
turtle.circle(9,90)
turtle.speed(0)
turtle.circle(40,70)
turtle.seth(-90)
turtle.fd(30)
turtle.seth(105)
turtle.fd(20)
turtle.seth(-100)
turtle.circle(80,75)
turtle.seth(30)
turtle.circle(90,80)
turtle.seth(-125)
turtle.fd(15)
turtle.right(90)
turtle.circle(100,15)
turtle.speed(0)
turtle.seth(-60)
turtle.end_fill()

turtle.circle(130,14)
turtle.penup()
turtle.goto(40,95)
turtle.right(70)
turtle.pendown()
turtle.circle(-120,8)
turtle.speed(1)
turtle.circle(-70,30)
turtle.speed(0)
turtle.circle(30,150)
turtle.penup()
turtle.goto(-32,65)
turtle.pendown()
turtle.right(60)
turtle.circle(80,30)
turtle.circle(-30,80)
turtle.speed(1)
turtle.circle(100,60)
turtle.circle(-130,40)

turtle.speed(0)
turtle.right(180)
turtle.circle(130,40)
turtle.pendown()
turtle.circle(-100,30)

turtle.speed(0)
turtle.right(90)
turtle.begin_fill()
turtle.fillcolor("green")
turtle.circle(80,40)
turtle.right(180)
turtle.circle(-80,30)
turtle.right(120)
turtle.circle(-40,100)
turtle.right(80)
turtle.circle(-40,100)
turtle.end_fill()

turtle.penup()
turtle.goto(19,-105)
turtle.pendown()
turtle.begin_fill()
turtle.fillcolor("green")

turtle.right(-30)
turtle.circle(-80,35)
turtle.right(180)
turtle.circle(80,23)
turtle.right(-120)
turtle.circle(40,100)
turtle.right(60)
turtle.right(-140)
turtle.circle(40,100)
turtle.end_fill()
turtle.exitonclick()

技術分享

玫瑰繪制(結對作業)