玫瑰花

老师再给我点时间。。。。颜色还没有调好!!!!qaq·····

import turtle as t
t.clear()
t.seth(0)
t.hideturtle()
t.setup(800,800,0,0)



def go_to(x,y):
    t.up()
    t.goto(x,y)
    t.down()

t.begin_fill()
t.color('black','red')
go_to(0,100)
t.circle(20,30)
t.seth(90)

t.speed(0)
for i in range(130):
    t.left(1) 
    t.fd(0.1)

t.right(30)
t.circle(20,40)

for i in range(50):
    t.left(2.5) 
    t.fd(0.1)

t.right(10)
t.circle(38,45)

t.left(10)
for i in range(50):
    t.left(1) 
    t.fd(0.1)

t.left(35)
t.circle(20,40)
t.left(15)
t.circle(40,50)


t.seth(270)
t.fd(20)
t.seth(120)
t.fd(8)
t.seth(250)
t.circle(45,120)
t.seth(35)
t.circle(50,100)
t.seth(250)
t.fd(8)
t.seth(109)
t.circle(15,50)
t.end_fill()

t.seth(280)
t.fd(18)
t.seth(45)
t.circle(15,55)

t.showturtle()
go_to(24,85)
t.seth(240)
t.fd(25)
t.circle(30,90)

go_to(-20,77)
t.seth(280)
t.circle(35,77)
t.seth(-30)
t.circle(-20,83)

t.seth(270)
t.pensize(5)
t.pencolor('green')
t.fd(140)

go_to(18,10)
t.pensize(2)
t.pencolor('black')
t.seth(135)
t.fd(5)
t.seth(45)
t.fd(5)

go_to(20,-30)
t.pensize(2)
t.pencolor('black')
t.seth(135)
t.fd(5)
t.seth(45)
t.fd(5)

go_to(22,-20)
t.pensize(2)
t.pencolor('black')
t.seth(45)
t.fd(5)
t.seth(135)
t.fd(5)

go_to(22,-70)
t.pensize(2)
t.pencolor('black')
t.seth(45)
t.fd(5)
t.seth(135)
t.fd(5)

go_to(22,-50)
t.pensize(2)
t.pencolor('black')
t.seth(45)
t.fd(5)
t.seth(135)
t.fd(5)

go_to(18,-60)
t.pensize(2)
t.pencolor('black')
t.seth(135)
t.fd(5)
t.seth(45)
t.fd(5)

go_to(22,0)
t.seth(20)
t.circle(100,20)
t.backward(20)
t.seth(90)
t.circle(-30,110)
t.seth(270)
t.circle(-30,110)

go_to(18,-40)
t.seth(160)
t.circle(-100,20)
t.backward(20)
t.seth(90)
t.circle(30,110)
t.seth(270)
t.circle(30,110)

  

 

posted @ 2017-11-01 11:54  做到平淡  阅读(217)  评论(0编辑  收藏  举报