这只皮卡丘用了我三天时间,这只皮卡丘十分生动,可爱,大大的眼睛,手圆圆的。
展示代码:
# coding:utf-8
from turtle import *
import turtle as t
from random import *
def infoPrt():
print('coordinate: ' + str(t.pos()))
print('angle: ' + str(t.heading()))
t.pensize(3)
t.hideturtle()
t.colormode(255)
t.color("black")
t.setup(700, 650)
t.speed(1)
t.st()
#t.dot()
t.pu()
#t.goto(-150,100)
t.goto(-210, 86)
t.pd()
infoPrt()
# 头
print('头')
t.seth(85)
t.circle(-100, 50)
#t.seth(78)
#t.circle(-100,25)
infoPrt()
t.seth(25)
t.circle(-170, 50)
infoPrt()
# 右耳
print('右耳')
t.seth(40)
#t.circle(-250,52)
t.circle(-250, 30)
infoPrt()
# 右耳尖
t.begin_fill()
# 左
t.circle(-250, 22)
#t.fillcolor("pink")
# 右
t.seth(227)
t.circle(-270, 15)
prePos = t.pos()
infoPrt()
# 下
t.seth(105)
t.circle(100, 32