终于成功!
颜色调的差强人意吧。
再放一下进化史。。
当然,它也是会进化的。
not good enough, try again.
perfect
本人初学,非常不成熟的代码如下。
from turtle import *
def change(x,y):
penup()
goto(x,y)
pendown()
pensize(7)
#body
begin_fill()
fillcolor('yellow')
change(0,100)
left(180)
circle(100,90)
forward(200)
circle(60,90)
forward(40)
#copybody
change(0,100)
right(180)
circle(100,-90)
forward(-200)
circle(60,-90)
forward(-40)
end_fill()
#eye
begin_fill()
fillcolor('white')
change(-28,-34)
circle(40)
end_fill()
begin_fill()
fillcolor('black')
change(-28,-8)
circle(13)
end_fill()
#copyeye
begin_fill()
fillcolor('white')
change(56,-34)
circle(40)
end_fill()
begin_fill()
fillcolor('black')
change(56,-8)
circle(13)
end_fill()
#glasses
begin_fill()
fillcolor('black')
change(-98,0)
forward(31)
left(90)
pensize(2)
forward(10)
left(90)
pensize(7)
forward(31)
left(90)
pensize(2)
forward(10)
pensize(7)
end_fill()
#cloth
begin_fill()
fillcolor('deep sky blue4')
change(-100,-200)
setheading(0)
forward(30)
left(90)
forward(75)
right(90)
forward(140)
right(90)
forward(75)
left(90)
forward(30)
left(90)
circle(60,-90)
forward(-80)
circle(60,-90)
end_fill()
#suspenders
begin_fill()
fillcolor('deep sky blue4')
change(-100,-125)
goto(-50,-150)
left(180)
forward(25)
left(90)
goto(-100,-100)
left(90)
forward(25)
end_fill()
change(-60,-130)
circle(-2)
#copysuspenders
begin_fill()
fillcolor('deep sky blue4')
change(100,-125)
setheading(180)
goto(50,-150)
right(90)
forward(25)
goto(100,-100)
right(180)
forward(25)
end_fill()
change(60,-130)
circle(2)
#pocket
change(30,-150)
setheading(180)
forward(60)
left(90)
forward(25)
circle(30,180)
forward(25)
#foot
begin_fill()
fillcolor('black')
change(-30,-260)
setheading(270)
forward(21)
right(90)
forward(11)
circle(10,180)
forward(36)
left(90)
forward(41)
left(90)
forward(25)
end_fill()
#copyfoot
begin_fill()
fillcolor('black')
change(30,-260)
setheading(90)
forward(-21)
left(90)
forward(-11)
circle(10,-180)
forward(-36)
right(90)
forward(-41)
left(90)
forward(-25)
end_fill()
#hand
begin_fill()
fillcolor('yellow')
change(-100,-125)
setheading(215)
circle(80,35)
left(70)
circle(100,20)
goto(-100,-164)
setheading(180)
circle(-7,180)
goto(-100,-125)
end_fill()
#copyhand
begin_fill()
fillcolor('yellow')
change(100,-125)
setheading(145)
circle(80,-35)
right(70)
circle(100,-20)
goto(100,-164)
setheading(180)
circle(-7,-180)
goto(100,-125)
end_fill()
#mouse
begin_fill()
fillcolor('white')
change(-10,-80)
setheading(0)
circle(150,30)
change(-10,-80)
setheading(330)
circle(130,21)
setheading(35)
circle(130,21)
goto(-10,-80)
end_fill()
#hair
change(-6,100)
setheading(135)
circle(50,75)
change(-6,100)
setheading(160)
circle(80,45)
change(0,102)
setheading(205)
circle(90,-48)
change(0,102)
setheading(186)
circle(175,-22)
hideturtle()
exitonclick()
期待更简洁;
感谢观看!