1. 程式人生 > >李雪瑩和魏子迪合作畫了一隻兔子

李雪瑩和魏子迪合作畫了一隻兔子

簡單少女心

import turtle
turtle.speed(1)
turtle.screensize(600,800,'red'and 'pink')
turtle.color('yellow')
turtle.pensize(10)
turtle.circle(100)
turtle.up()
turtle.circle(100,150)
turtle.down()
turtle.right(80)
a=1
turtle.fd(90)
turtle.circle(30,40)
for i in range(120):
    if 0<=i<50:
        a=a+0.02
        turtle.lt(3)  #向左轉3度
        turtle.fd(a)  #向前走a的步長

turtle.fd(80)
turtle.right(150)
turtle.fd(100)
turtle.circle(30,200)
turtle.fd(75)

turtle.up()  #left
turtle.right(30)
turtle.fd(80)
turtle.down()
turtle.pensize(8)
turtle.circle(20)
turtle.circle(20,110)
turtle.circle(10)
turtle.right(30)

turtle.up()   #right
turtle.fd(50)
turtle.down()
turtle.pensize(8)
turtle.circle(17)
turtle.circle(8)

turtle.up()   #nose
turtle.right(120)
turtle.fd(50)
turtle.down()
turtle.pensize(15)
turtle.circle(1)
turtle.pensize(8)
turtle.circle(20,130)
turtle.left(30)
turtle.up()
turtle.left(60)
turtle.circle(30,65)
turtle.down()
turtle.left(100)
turtle.fd(2)
turtle.circle(-20,100)

turtle.up()  #body
turtle.pensize(10)
turtle.left(62)
turtle.fd(50)
turtle.down()
turtle.left(20)
turtle.fd(120)
turtle.circle(120,20)
turtle.pensize(40)
turtle.circle(-3)
turtle.pensize(10)
turtle.circle(110,40)
turtle.circle(20,20)
turtle.left(35)
turtle.fd(170)
turtle.circle(60,100)
turtle.circle(40,150)
turtle.up()
turtle.left(40)
turtle.fd(40)
turtle.down()
turtle.left(180)
turtle.fd(100)

turtle.right(120)    #arm
turtle.circle(60,100)
turtle.circle(20,130)
turtle.circle(-60,70)
turtle.circle(-20,50)

turtle.up()
turtle.right(150)
turtle.color('red')
turtle.pensize(20)
turtle.left(180)
turtle.fd(85)
turtle.down()
turtle.circle(3)

#xin
turtle.colormode(255)
turtle.pensize(3)
turtle.speed(0)
turtle.seth(0)
turtle.penup()
turtle.fd(250)
turtle.pendown()

def drawxin(radius,angle,length):
    turtle.circle(radius,angle)

turtle.color((255,62,150))
turtle.begin_fill()
turtle.seth(40)
turtle.fd(40)
turtle.circle(60,70,20)
turtle.circle(30,130,30)
turtle.seth(120)  #left

turtle.circle(30,130,30)
turtle.circle(60,80,20)
turtle.fd(40)
turtle.end_fill()  #right

turtle.seth(90)
turtle.pensize(3)
turtle.fillcolor((255,162,193))
turtle.begin_fill()
turtle.seth(90)
turtle.penup()
turtle.fd(15)
turtle.pendown()

turtle.seth(40)
turtle.fd(40)
turtle.circle(38,80,800)
turtle.circle(24,140,30)
turtle.seth(110)
turtle.circle(29,115,30)
turtle.seth(240)
turtle.circle(38,80,800)
turtle.seth(324)
turtle.fd(52)
turtle.end_fill()

turtle.pensize(1)
turtle.color('white')
turtle.fillcolor((255,255,224))
turtle.begin_fill()
turtle.seth(90)
turtle.penup()
turtle.fd(50)
turtle.pendown()
turtle.circle(5)
turtle.end_fill()
turtle.pensize(1)
turtle.color('white')
turtle.fillcolor((255,255,224))
turtle.begin_fill()
turtle.seth(0)
turtle.penup()
turtle.fd(30)
turtle.pendown()
turtle.circle(5)
turtle.end_fill()
turtle.pensize(1)
turtle.color('white')
turtle.fillcolor((255,255,224))
turtle.begin_fill()
turtle.seth(230)
turtle.penup()
turtle.fd(30)
turtle.pendown()
turtle.circle(5)
turtle.end_fill()
turtle.pensize(1)
turtle.color('white')
turtle.fillcolor((255,255,224))
turtle.begin_fill()
turtle.seth(180)
turtle.penup()
turtle.fd(20)
turtle.pendown()
turtle.circle(5)
turtle.end_fill()
turtle.pensize(1)
turtle.color('white')
turtle.fillcolor((255,255,224))
turtle.begin_fill()
turtle.seth(140)
turtle.penup()
turtle.fd(30)
turtle.pendown()
turtle.circle(5)
turtle.end_fill()
turtle.pensize(1)
turtle.color('white')
turtle.fillcolor((255,255,224))
turtle.begin_fill()
turtle.seth(110)
turtle.penup()
turtle.fd(26)
turtle.pendown()
turtle.circle(5)
turtle.end_fill()
turtle.pensize(1)
turtle.color('white')
turtle.fillcolor((255,255,224))
turtle.begin_fill()
turtle.seth(0)
turtle.penup()
turtle.fd(20)
turtle.pendown()
turtle.circle(5)
turtle.end_fill()
turtle.pensize(1)
turtle.color('white')
turtle.fillcolor((255,255,224))
turtle.begin_fill()
turtle.seth(0)
turtle.penup()
turtle.fd(50)
turtle.pendown()
turtle.circle(5)
turtle.end_fill()


turtle.penup()
turtle.seth(220)
turtle.fd(600)
turtle.pendown()
turtle.color((238,130,238))
turtle.begin_fill()
turtle.seth(40)
turtle.fd(40)
turtle.circle(60,70,20)
turtle.circle(30,130,30)
turtle.seth(120)  #left

turtle.circle(30,130,30)
turtle.circle(60,80,20)
turtle.fd(40)
turtle.end_fill()  #right



turtle.pensize(1)
turtle.color('red')
turtle.fillcolor((255,0,0))
turtle.begin_fill()

turtle.penup()
turtle.seth(0)
turtle.fd(20)
turtle.pendown()
turtle.seth(40)
turtle.fd(40)
turtle.circle(38,80,800)
turtle.circle(24,140,30)
turtle.seth(110)
turtle.circle(29,115,30)
turtle.seth(240)
turtle.circle(38,80,800)
turtle.seth(324)
turtle.fd(52)
turtle.end_fill()