废话不多说,直接上图

1. 皮卡丘

import turtledef getPosition(x, y):turtle.setx(x)turtle.sety(y)print(x, y)class Pikachu:def __init__(self):self.t = turtle.Turtle()t = self.tt.pensize(3)t.speed(9)t.ondrag(getPosition)def noTrace_goto(self, x, y):self.t.penup()self.t.goto(x, y)self.t.pendown()def leftEye(self, x, y):self.noTrace_goto(x, y)t = self.tt.seth(0)t.fillcolor('#333333')t.begin_fill()t.circle(22)t.end_fill()self.noTrace_goto(x, y + 10)t.fillcolor('#000000')t.begin_fill()t.circle(10)t.end_fill()self.noTrace_goto(x + 6, y + 22)t.fillcolor('#ffffff')t.begin_fill()t.circle(10)t.end_fill()def rightEye(self, x, y):self.noTrace_goto(x, y)t = self.tt.seth(0)t.fillcolor('#333333')t.begin_fill()t.circle(22)t.end_fill()self.noTrace_goto(x, y + 10)t.fillcolor('#000000')t.begin_fill()t.circle(10)t.end_fill()self.noTrace_goto(x - 6, y + 22)t.fillcolor('#ffffff')t.begin_fill()t.circle(10)t.end_fill()def mouth(self, x, y):self.noTrace_goto(x, y)t = self.tt.fillcolor('#88141D')t.begin_fill()# 下嘴唇l1 = []l2 = []t.seth(190)a = 0.7for i in range(28):a += 0.1t.right(3)t.fd(a)l1.append(t.position())self.noTrace_goto(x, y)t.seth(10)a = 0.7for i in range(28):a += 0.1t.left(3)t.fd(a)l2.append(t.position())# 上嘴唇t.seth(10)t.circle(50, 15)t.left(180)t.circle(-50, 15)t.circle(-50, 40)t.seth(233)t.circle(-50, 55)t.left(180)t.circle(50, 12.1)t.end_fill()# 舌头self.noTrace_goto(17, 54)t.fillcolor('#DD716F')t.begin_fill()t.seth(145)t.circle(40, 86)t.penup()for pos in reversed(l1[:20]):t.goto(pos[0], pos[1] + 1.5)for pos in l2[:20]:t.goto(pos[0], pos[1] + 1.5)t.pendown()t.end_fill()# 鼻子self.noTrace_goto(-17, 94)t.seth(8)t.fd(4)t.back(8)# 红脸颊def leftCheek(self, x, y):turtle.tracer(False)t = self.tself.noTrace_goto(x, y)t.seth(300)t.fillcolor('#DD4D28')t.begin_fill()a = 2.3for i in range(120):if 0 <= i < 30 or 60 <= i < 90:a -= 0.05t.lt(3)t.fd(a)else:a += 0.05t.lt(3)t.fd(a)t.end_fill()turtle.tracer(True)def rightCheek(self, x, y):t = self.tturtle.tracer(False)self.noTrace_goto(x, y)t.seth(60)t.fillcolor('#DD4D28')t.begin_fill()a = 2.3for i in range(120):if 0 <= i < 30 or 60 <= i < 90:a -= 0.05t.lt(3)t.fd(a)else:a += 0.05t.lt(3)t.fd(a)t.end_fill()turtle.tracer(True)def colorLeftEar(self, x, y):t = self.tself.noTrace_goto(x, y)t.fillcolor('#000000')t.begin_fill()t.seth(330)t.circle(100, 35)t.seth(219)t.circle(-300, 19)t.seth(110)t.circle(-30, 50)t.circle(-300, 10)t.end_fill()def colorRightEar(self, x, y):t = self.tself.noTrace_goto(x, y)t.fillcolor('#000000')t.begin_fill()t.seth(300)t.circle(-100, 30)t.seth(35)t.circle(300, 15)t.circle(30, 50)t.seth(190)t.circle(300, 17)t.end_fill()def body(self):t = self.tt.fillcolor('#F6D02F')t.begin_fill()# 右脸轮廓t.penup()t.circle(130, 40)t.pendown()t.circle(100, 105)t.left(180)t.circle(-100, 5)# 右耳朵t.seth(20)t.circle(300, 30)t.circle(30, 50)t.seth(190)t.circle(300, 36)# 上轮廓t.seth(150)t.circle(150, 70)# 左耳朵t.seth(200)t.circle(300, 40)t.circle(30, 50)t.seth(20)t.circle(300, 35)# print(t.pos())# 左脸轮廓t.seth(240)t.circle(105, 95)t.left(180)t.circle(-105, 5)# 左手t.seth(210)t.circle(500, 18)t.seth(200)t.fd(10)t.seth(280)t.fd(7)t.seth(210)t.fd(10)t.seth(300)t.circle(10, 80)t.seth(220)t.fd(10)t.seth(300)t.circle(10, 80)t.seth(240)t.fd(12)t.seth(0)t.fd(13)t.seth(240)t.circle(10, 70)t.seth(10)t.circle(10, 70)t.seth(10)t.circle(300, 18)t.seth(75)t.circle(500, 8)t.left(180)t.circle(-500, 15)t.seth(250)t.circle(100, 65)# 左脚t.seth(320)t.circle(100, 5)t.left(180)t.circle(-100, 5)t.seth(220)t.circle(200, 20)t.circle(20, 70)t.seth(60)t.circle(-100, 20)t.left(180)t.circle(100, 20)t.seth(300)t.circle(10, 70)t.seth(60)t.circle(-100, 20)t.left(180)t.circle(100, 20)t.seth(10)t.circle(100, 60)# 横向t.seth(180)t.circle(-100, 10)t.left(180)t.circle(100, 10)t.seth(5)t.circle(100, 10)t.circle(-100, 40)t.circle(100, 35)t.left(180)t.circle(-100, 10)# 右脚t.seth(290)t.circle(100, 55)t.circle(10, 50)t.seth(120)t.circle(100, 20)t.left(180)t.circle(-100, 20)t.seth(0)t.circle(10, 50)t.seth(110)t.circle(100, 20)t.left(180)t.circle(-100, 20)t.seth(30)t.circle(20, 50)t.seth(100)t.circle(100, 40)# 右侧身体轮廓t.seth(200)t.circle(-100, 5)t.left(180)t.circle(100, 5)t.left(30)t.circle(100, 75)t.right(15)t.circle(-300, 21)t.left(180)t.circle(300, 3)# 右手t.seth(43)t.circle(200, 60)t.right(10)t.fd(10)t.circle(5, 160)t.seth(90)t.circle(5, 160)t.seth(90)t.fd(10)t.seth(90)t.circle(5, 180)t.fd(10)t.left(180)t.left(20)t.fd(10)t.circle(5, 170)t.fd(10)t.seth(240)t.circle(50, 30)t.end_fill()self.noTrace_goto(130, 125)t.seth(-20)t.fd(5)t.circle(-5, 160)t.fd(5)# 手指纹self.noTrace_goto(166, 130)t.seth(-90)t.fd(3)t.circle(-4, 180)t.fd(3)t.seth(-90)t.fd(3)t.circle(-4, 180)t.fd(3)# 尾巴self.noTrace_goto(168, 134)t.fillcolor('#F6D02F')t.begin_fill()t.seth(40)t.fd(200)t.seth(-80)t.fd(150)t.seth(210)t.fd(150)t.left(90)t.fd(100)t.right(95)t.fd(100)t.left(110)t.fd(70)t.right(110)t.fd(80)t.left(110)t.fd(30)t.right(110)t.fd(32)t.right(106)t.circle(100, 25)t.right(15)t.circle(-300, 2)############### print(t.pos())t.seth(30)t.fd(40)t.left(100)t.fd(70)t.right(100)t.fd(80)t.left(100)t.fd(46)t.seth(66)t.circle(200, 38)t.right(10)t.fd(10)t.end_fill()# 尾巴花纹t.fillcolor('#923E24')self.noTrace_goto(126.82, -156.84)t.begin_fill()t.seth(30)t.fd(40)t.left(100)t.fd(40)t.pencolor('#923e24')t.seth(-30)t.fd(30)t.left(140)t.fd(20)t.right(150)t.fd(20)t.left(150)t.fd(20)t.right(150)t.fd(20)t.left(130)t.fd(18)t.pencolor('#000000')t.seth(-45)t.fd(67)t.right(110)t.fd(80)t.left(110)t.fd(30)t.right(110)t.fd(32)t.right(106)t.circle(100, 25)t.right(15)t.circle(-300, 2)t.end_fill()# 帽子、眼睛、嘴巴、脸颊self.cap(-134.07, 147.81)self.mouth(-5, 25)self.leftCheek(-126, 32)self.rightCheek(107, 63)self.colorLeftEar(-250, 100)self.colorRightEar(140, 270)self.leftEye(-85, 90)self.rightEye(50, 110)t.hideturtle()def cap(self, x, y):self.noTrace_goto(x, y)t = self.tt.fillcolor('#CD0000')t.begin_fill()t.seth(200)t.circle(400, 7)t.left(180)t.circle(-400, 30)t.circle(30, 60)t.fd(50)t.circle(30, 45)t.fd(60)t.left(5)t.circle(30, 70)t.right(20)t.circle(200, 70)t.circle(30, 60)t.fd(70)# print(t.pos())t.right(35)t.fd(50)t.circle(8, 100)t.end_fill()self.noTrace_goto(-168.47, 185.52)t.seth(36)t.circle(-270, 54)t.left(180)t.circle(270, 27)t.circle(-80, 98)t.fillcolor('#444444')t.begin_fill()t.left(180)t.circle(80, 197)t.left(58)t.circle(200, 45)t.end_fill()self.noTrace_goto(-58, 270)t.pencolor('#228B22')t.dot(35)self.noTrace_goto(-30, 280)t.fillcolor('#228B22')t.begin_fill()t.seth(100)t.circle(30, 180)t.seth(190)t.fd(15)t.seth(100)t.circle(-45, 180)t.right(90)t.fd(15)t.end_fill()t.pencolor('#000000')def start(self):self.body()def main():print('Painting the Pikachu... ')turtle.screensize(800, 600)turtle.title('Pikachu')pikachu = Pikachu()pikachu.start()turtle.mainloop()if __name__ == '__main__':main()

2. 小樱的魔法阵

import turtle as t
import timedef tcyuan(x, y, r):t.fillcolor("black")t.begin_fill()t.seth(0)y = y - rt.penup()t.goto(x, y)t.pendown()t.circle(r)t.end_fill()def yuan(x, y, r):t.seth(0)y = y - rt.penup()t.goto(x, y)t.pendown()t.circle(r)def yueliang():R = 110 - 1r = R - 22 - 1# 月亮填充t.penup()t.goto(-350 + 2 * R, 0)t.seth(90)t.fillcolor("black")t.begin_fill()t.circle(R, 359)t.left(90)t.fd(2)t.left(90)t.circle(-r, 359)t.left(90)t.fd(2)t.pendown()t.end_fill()# 轮廓yuan(-350 + R, 0, R)yuan(-350 + 44 + r - 2, 0, r - 2)def zhixian(R, r, count, jiaodu):t.seth(90 + jiaodu)#    t.goto(0, 0)for i in range(count):t.penup()t.goto(0, 0)t.fd(r)t.pendown()t.fd(R - r)t.left(360 / count)def zfx(R, r):jiange = 10#    t.pensize(jiange)t.seth(90)big = pow((R ** 2) * 2, 0.5)small = big - 2 * jiangefor i in range(13):# 大线t.penup()t.goto(0, 0)t.fd(R)t.pendown()t.right(135)t.fd(big)# 小线t.left(135)t.penup()t.goto(0, 0)t.fd(pow((small ** 2) / 2, 0.5))t.pendown()t.right(135)t.fd(small)# 粗线t.pensize(8)t.pencolor("black")t.left(135)t.penup()t.goto(0, 0)t.fd((R + pow((small ** 2) / 2, 0.5)) / 2)t.pendown()t.right(135)t.fd((big + small) / 2)t.pensize(2)t.pencolor("yellow")t.seth(90 + i * 30)else:# 大线t.penup()t.goto(0, 0)t.fd(R)t.right(135)t.fd(big / 2)t.pendown()t.fd(big / 2)# 小线t.left(135)t.penup()t.goto(0, 0)t.fd(pow((small ** 2) / 2, 0.5))t.right(135)t.fd(small / 2)t.pendown()t.fd(small / 2)# 粗线t.pensize(8)t.pencolor("black")t.left(135)t.penup()t.goto(0, 0)t.fd((R + pow((small ** 2) / 2, 0.5)) / 2)t.right(135)t.fd((big + small) / 2 / 2)t.pendown()t.fd((big + small) / 2 / 2)t.pensize(2)t.pencolor("yellow")t.seth(90 + i * 30)def wjx(r, jiaodu):t.fillcolor("black")t.penup()t.goto(0, 0)t.seth(90 + jiaodu)t.fd(r)t.pendown()t.right(18)t.begin_fill()for i in range(5):t.right(144)t.forward(144)t.left(72)t.forward(144)t.end_fill()if jiaodu != 0:t.seth(90 + jiaodu)for i in range(1, 6):t.penup()t.goto(0, 0)t.left(72)t.pendown()t.fd(r)def xingzuo():r = 250t.penup()t.goto(20, -35)t.seth(-45)t.fd(r)t.pendown()xz = ['♒', '♓', '♈', '♉', '♌', '♍', '♎', '♏']for i in range(4):t.write(xz[i], font=("", 20, ""))t.penup()t.right(90)t.circle(-300, 30)t.left(90)t.pendown()t.penup()t.goto(-r / 4 + 10, 5)t.seth(135)t.fd(r)for i in range(4, 8):t.write(xz[i], font=("", 20, ""))t.penup()t.right(90)t.circle(-300, 30)t.left(90)t.pendown()def dxnb(s):t.penup()t.fd(-19)t.left(90)t.fd(2)t.pendown()t.write(s, font=["KaiTi", 30, "bold"])def taiyang():def haicao(r, i):# 海藻t.fillcolor("black")t.penup()if i == 0:t.goto(256, r)elif i == 1:t.goto(256 - r, 0)else:t.goto(256, -r)t.pendown()t.begin_fill()t.seth(2 + i * 90)t.circle(r / 2, 105)t.left(10)t.circle(-r / 3, 90)t.circle(r / 3, 60)t.left(20)t.circle(r / 3, -80)t.left(50)t.circle(-r + 10, -40)t.right(30)t.circle(r / 2 + 10, -50)t.penup()if i == 0:t.goto(256, r)elif i == 1:t.goto(256 - r, 0)else:t.goto(256, -r)t.pendown()t.end_fill()t.seth(2 + i * 90)t.circle(r / 2, 105)t.left(10)t.circle(-r / 3, 90)t.begin_fill()t.circle(r / 3, 60)t.left(20)t.circle(r / 3, -80)t.left(50)t.circle(-r + 10, -40)t.right(30)t.circle(r / 2 + 10, -50)t.right(30)t.circle(r / 2 - 2, 110)t.circle(-r / 3, 70)t.left(7)t.circle(r / 3, 85)t.end_fill()t.penup()if i == 0:t.goto(256, r)t.pendown()t.seth(180 - (2 + i * 90))t.circle(-(r / 2), 105)elif i == 1:t.goto(256 - r, 0)t.pendown()t.seth(- (2 + i * 90))t.circle(-(r / 2), 105)else:t.goto(256, -r)t.pendown()t.seth(180 - (2 + i * 90))t.circle(-(r / 2), 105)t.begin_fill()t.left(-10)t.circle(-(-r / 3), 90)t.circle(-(r / 3), 60)t.left(-20)t.circle(-(r / 3), -80)t.left(-50)t.circle(-(-r + 10), -40)t.right(-30)t.circle(-(r / 2 + 10), -50)t.end_fill()t.penup()if i == 0:t.goto(256, r)t.pendown()t.seth(180 - (2 + i * 90))t.circle(-(r / 2), 105)elif i == 1:t.goto(256 - r, 0)t.pendown()t.seth(- (2 + i * 90))t.circle(-(r / 2), 105)else:t.goto(256, -r)t.pendown()t.seth(180 - (2 + i * 90))t.circle(-(r / 2), 105)t.pendown()t.left(-10)t.circle(-(-r / 3), 90)t.circle(-(r / 3), 60)t.left(-20)t.begin_fill()t.circle(-(r / 3), -80)t.left(-50)t.circle(-(-r + 10), -40)t.right(-30)t.circle(-(r / 2 + 10), -50)t.right(-30)t.circle(-(r / 2 - 2), 110)t.circle(-(-r / 3), 70)t.left(-7)t.circle(-(r / 3), 85)t.end_fill()def xhaicao(r, i):t.penup()t.goto(256 + r, 0)t.seth(-90)t.circle(-r, 20)t.pendown()t.begin_fill()t.seth(30)t.circle(-r / 3, 100)t.circle(r / 6, 140)t.circle(-r / 11, 100)t.left(80)t.circle(-r / 2, -30)t.circle(r / 4, -140)t.circle(-r / 3, -60)t.end_fill()t.penup()t.goto(256 + r, 0)t.seth(-90)t.circle(-r, 30)t.pendown()t.seth(45)t.circle(-r / 4, 100)t.right(20)t.circle(r / 4, 140)t.right(10)t.circle(-r / 11, 90)t.penup()t.goto(256 + r, 0)t.seth(90)t.circle(r, 20)t.pendown()t.begin_fill()t.seth(-30)t.circle(-(-r / 3), 100)t.circle(-(r / 6), 140)t.circle(-(-r / 11), 100)t.left(-80)t.circle(-(-r / 2), -30)t.circle(-(r / 4), -140)t.circle(-(-r / 3), -60)t.end_fill()t.penup()t.goto(256 + r, 0)t.seth(90)t.circle(r, 30)t.pendown()t.seth(-45)t.circle(-(-r / 4), 100)t.right(-25)t.circle(-(r / 4), 140)t.right(-10)t.circle(-(-r / 11), 90)r = 50# 海藻haicao(r, 0)haicao(r, 1)haicao(r, 2)xhaicao(r, 3)# 大三角形t.fillcolor("black")for i in range(1, 4):temp = 3t.penup()t.goto(256, 0)t.seth(i * 90)t.pendown()t.begin_fill()t.right(22.5)t.fd(r)if i == 1:t.goto(256, 3 * r - temp)t.goto(256, 0)t.seth(i * 90 + 22.5)t.fd(r)t.goto(256, 3 * r - temp)elif i == 2:t.goto(256 - 3 * r + temp, 0)t.goto(256, 0)t.seth(i * 90 + 22.5)t.fd(r)t.goto(256 - 3 * r + temp, 0)else:t.goto(256, -3 * r + temp)t.goto(256, 0)t.seth(i * 90 + 22.5)t.fd(r)t.goto(256, -3 * r + temp)t.end_fill()# 小三角形x = pow(((2 * r) ** 2) / 2, 0.5) - 8for i in range(1, 5):t.penup()t.goto(256, 0)t.seth(i * 90)t.pendown()t.begin_fill()t.right(22.5)t.fd(r)if i == 1:t.goto(256 + x, x)t.goto(256, 0)t.right(45)t.fd(r)t.goto(256 + x, x)elif i == 2:t.goto(256 - x, x)t.goto(256, 0)t.right(45)t.fd(r)t.goto(256 - x, x)elif i == 3:t.goto(256 - x, -x)t.goto(256, 0)t.right(45)t.fd(r)t.goto(256 - x, -x)else:t.goto(256 + x, -x)t.goto(256, 0)t.right(45)t.fd(r)t.goto(256 + x, -x)t.end_fill()# 圆#    t.begin_fill()tcyuan(256, 0, r)# 初始化
t.setup(1500, 800, 0, 0)
t.speed(0)
t.bgcolor("black")
t.pencolor("yellow")
t.pensize(2)
# 最大的圆
yuan(0, 0, 350)
yuan(0, 0, 325)
yuan(0, 0, 321)
yuan(0, 0, 306)
zhixian(321, 306, 72, 0)
# 小圆
yuan(0, 0, 204)
yuan(0, 0, 200)
yuan(0, 0, 186)
zhixian(200, 186, 72, 0)
# 正方形边框以及直线
zhixian(290, 213, 12, 0)
zhixian(248, 205, 12, 15)
zfx(306, 204)
# 里五角星
wjx(200, 36)
# 月亮
yueliang()
# 太阳
taiyang()
# 最小圆
tcyuan(0, 328, 22)
dxnb("北")
tcyuan(0, -328, 22)
dxnb("南")
tcyuan(-328, 0, 22)
dxnb("西")
tcyuan(328, 0, 22)
dxnb("東")
xingzuo()
#展示
time.sleep(30)   #展示时间30s

3. 小猪佩奇

import turtle as t
t.pensize(4)
t.hideturtle()
t.colormode(255)
t.color((255, 155, 192), "pink")
t.setup(840, 500)
t.speed(20)
# 鼻子
t.pu()
t.goto(-100, 100)
t.pd()
t.seth(-30)
t.begin_fill()
a = 0.4
for i in range(120):if 0 <= i < 30 or 60 <= i < 90:a = a + 0.08t.lt(3)  # 向左转3度t.fd(a)  # 向前走a的步长else:a = a - 0.08t.lt(3)t.fd(a)
t.end_fill()
t.pu()
t.seth(90)
t.fd(25)
t.seth(0)
t.fd(10)
t.pd()
t.pencolor(255, 155, 192)
t.seth(10)
t.begin_fill()
t.circle(5)
t.color(160, 82, 45)
t.end_fill()
t.pu()
t.seth(0)
t.fd(20)
t.pd()
t.pencolor(255, 155, 192)
t.seth(10)
t.begin_fill()
t.circle(5)
t.color(160, 82, 45)
t.end_fill()
# 头
t.color((255, 155, 192), "pink")
t.pu()
t.seth(90)
t.fd(41)
t.seth(0)
t.fd(0)
t.pd()
t.begin_fill()
t.seth(180)
t.circle(300, -30)
t.circle(100, -60)
t.circle(80, -100)
t.circle(150, -20)
t.circle(60, -95)
t.seth(161)
t.circle(-300, 15)
t.pu()
t.goto(-100, 100)
t.pd()
t.seth(-30)
a = 0.4
for i in range(60):if 0 <= i < 30 or 60 <= i < 90:a = a + 0.08t.lt(3)  # 向左转3度t.fd(a)  # 向前走a的步长else:a = a - 0.08t.lt(3)t.fd(a)
t.end_fill()
# 耳朵
t.color((255, 155, 192), "pink")
t.pu()
t.seth(90)
t.fd(-7)
t.seth(0)
t.fd(70)
t.pd()
t.begin_fill()
t.seth(100)
t.circle(-50, 50)
t.circle(-10, 120)
t.circle(-50, 54)
t.end_fill()
t.pu()
t.seth(90)
t.fd(-12)
t.seth(0)
t.fd(30)
t.pd()
t.begin_fill()
t.seth(100)
t.circle(-50, 50)
t.circle(-10, 120)
t.circle(-50, 56)
t.end_fill()
# 眼睛
t.color((255, 155, 192), "white")
t.pu()
t.seth(90)
t.fd(-20)
t.seth(0)
t.fd(-95)
t.pd()
t.begin_fill()
t.circle(15)
t.end_fill()
t.color("black")
t.pu()
t.seth(90)
t.fd(12)
t.seth(0)
t.fd(-3)
t.pd()
t.begin_fill()
t.circle(3)
t.end_fill()
t.color((255, 155, 192), "white")
t.pu()
t.seth(90)
t.fd(-25)
t.seth(0)
t.fd(40)
t.pd()
t.begin_fill()
t.circle(15)
t.end_fill()
t.color("black")
t.pu()
t.seth(90)
t.fd(12)
t.seth(0)
t.fd(-3)
t.pd()
t.begin_fill()
t.circle(3)
t.end_fill()
# 腮
t.color((255, 155, 192))
t.pu()
t.seth(90)
t.fd(-95)
t.seth(0)
t.fd(65)
t.pd()
t.begin_fill()
t.circle(30)
t.end_fill()
# 嘴
t.color(239, 69, 19)
t.pu()
t.seth(90)
t.fd(15)
t.seth(0)
t.fd(-100)
t.pd()
t.seth(-80)
t.circle(30, 40)
t.circle(40, 80)
# 身体
t.color("red", (255, 99, 71))
t.pu()
t.seth(90)
t.fd(-20)
t.seth(0)
t.fd(-78)
t.pd()
t.begin_fill()
t.seth(-130)
t.circle(100, 10)
t.circle(300, 30)
t.seth(0)
t.fd(230)
t.seth(90)
t.circle(300, 30)
t.circle(100, 3)
t.color((255, 155, 192), (255, 100, 100))
t.seth(-135)
t.circle(-80, 63)
t.circle(-150, 24)
t.end_fill()
# 手
t.color((255, 155, 192))
t.pu()
t.seth(90)
t.fd(-40)
t.seth(0)
t.fd(-27)
t.pd()
t.seth(-160)
t.circle(300, 15)
t.pu()
t.seth(90)
t.fd(15)
t.seth(0)
t.fd(0)
t.pd()
t.seth(-10)
t.circle(-20, 90)
t.pu()
t.seth(90)
t.fd(30)
t.seth(0)
t.fd(237)
t.pd()
t.seth(-20)
t.circle(-300, 15)
t.pu()
t.seth(90)
t.fd(20)
t.seth(0)
t.fd(0)
t.pd()
t.seth(-170)
t.circle(20, 90)
# 脚
t.pensize(10)
t.color((240, 128, 128))
t.pu()
t.seth(90)
t.fd(-75)
t.seth(0)
t.fd(-180)
t.pd()
t.seth(-90)
t.fd(40)
t.seth(-180)
t.color("black")
t.pensize(15)
t.fd(20)
t.pensize(10)
t.color((240, 128, 128))
t.pu()
t.seth(90)
t.fd(40)
t.seth(0)
t.fd(90)
t.pd()
t.seth(-90)
t.fd(40)
t.seth(-180)
t.color("black")
t.pensize(15)
t.fd(20)
# 尾巴
t.pensize(4)
t.color((255, 155, 192))
t.pu()
t.seth(90)
t.fd(70)
t.seth(0)
t.fd(95)
t.pd()
t.seth(0)
t.circle(70, 20)
t.circle(10, 330)
t.circle(70, 30)
t.exitonclick()

4. 类似网页皮卡丘

from turtle import *
import timescreensize(650, 500, "yellow")
setup(800, 550)
penup()
goto(-185, 65)
pendown()
pensize(5)
color("black")
begin_fill()
circle(50, 360)
end_fill()
penup()
goto(-210, 110)
pendown()
pensize(5)
color("white")
begin_fill()
circle(20, 360)
end_fill()penup()
goto(185, 65)
pendown()
pensize(5)
color("black")
begin_fill()
circle(50, 360)
end_fill()
penup()
goto(160, 110)
pendown()
pensize(5)
color("white")
begin_fill()
circle(20, 360)
end_fill()penup()
goto(-270, -130)
pendown()
color("red")
begin_fill()
circle(75, 360)
end_fill()penup()
goto(270, -130)
pendown()
color("red")
begin_fill()
circle(75, 360)
end_fill()penup()
color("black")
begin_fill()
pensize()
goto(0, 30)
seth(30)
pendown()
fd(30)
penup()
seth(120)
pendown()
circle(30, 120)
penup()
seth(150)
pendown()
color("black")
fd(-30)
end_fill()penup()goto(0, 5)
seth(190)
pensize(3)
pendown()
fd(130)
seth(150)circle(-30, 50)
penup()
goto(0, 5)
seth(-10)
pensize(3)
pendown()
fd(130)seth(30)circle(30, 50)penup()
goto(-100, -15)
seth(290)
pendown()
fd(180)
penup()from turtle import*
import time# 设置抬笔跳跃
def my_goto(x, y):penup()goto(x, y)pendown()
# 绘制项圈
def collar():color("red")pencolor("black")begin_fill()my_goto(-100, 0)lt(10)circle(-800, 20)rt(70)fd(10)goto(-100, -10)goto(-100, 0)end_fill()
# 绘制大脸
def face():color("sky blue")pencolor("black")begin_fill()lt(46)circle(251,-293)lt(10)circle(200,273)end_fill()
# 绘制眼睛
def eyes():# 绘制左眼my_goto(-45,338)color("white")begin_fill()pencolor("black")tracer(False)a = 3rt(45)for i in range(120):if 0 <= i < 30 or 60 <= i < 90:a -= 0.05lt(3)fd(a)else:a += 0.05lt(3)fd(a)tracer(True)end_fill()# 绘制左眼球color("black")begin_fill()pencolor("black")my_goto(-5, 320)circle(15)end_fill()color("white")begin_fill()my_goto(10, 318)circle(5)end_fill()# 绘制右眼my_goto(45,338)color("white")begin_fill()pencolor("black")tracer(False)a = 3for i in range(120):if 0 <= i < 30 or 60 <= i < 90:a -= 0.05lt(3)fd(a)else:a += 0.05lt(3)fd(a)tracer(True)end_fill()# 绘制右黑眼球color("black")begin_fill()pencolor("black")my_goto(50,320)circle(15)end_fill()color("white")begin_fill()my_goto(54, 318)circle(5)end_fill()
# 绘制鼻子
def nose():pensize(3)color("red")begin_fill()pencolor("black")my_goto(4,272)circle(35)end_fill()# 绘制鼻尖color("white")begin_fill()my_goto(33, 290)circle(5)end_fill()
# 绘制嘴巴
def mouse():pencolor("black")my_goto(38,202)goto(38,50)my_goto(-110,160)lt(15)circle(150,150)
# 绘制胡子
def beard():pencolor("black")pensize(4)# 绘制左边的胡子my_goto(-120,200)goto(-20,180)my_goto(-120, 170)goto(-20,160)my_goto(-120, 130)goto(-20,140)# 绘制右边的胡子my_goto(196,200)goto(96,180)my_goto(196, 170)goto(96,160)my_goto(196, 130)goto(96,140)
# 绘制猫身
def body():color("sky blue")begin_fill()pencolor("black")# 左半边的身子my_goto(-100, -10)rt(35)fd(-180)circle(-50,-180)fd(-80)lt(50)fd(-60)fd(190)rt(30)fd(60)lt(115)fd(80)lt(10)fd(65)#机器猫的裤裆lt(90)circle(-35,190)lt(90)fd(65)rt(-10)fd(80)# 右半边的身子lt(115)fd(60)rt(35)fd(190)fd(-60)rt(60)fd(180)circle(50,180)goto(185,-10)goto(-100, -10)end_fill()
# 绘制猫肚子
def belly():color("white")pencolor("black")begin_fill()my_goto(-80,-10)seth(0)lt(80)circle(-120, -200)end_fill()my_goto(-10,-70)seth(0)lt(80)circle(-50, -200)goto(-10,-70)
# 绘制铃铛
def bell():my_goto(38,-10)seth(180)color("yellow")begin_fill()pencolor("black")circle(20)end_fill()
# 绘制双手
def hand():# 绘制左手color("white")begin_fill()pencolor("black")my_goto(-230,-125)circle(60)end_fill()# 绘制右手color("white")begin_fill()pencolor("black")my_goto(380, 50)circle(60)end_fill()
# 绘制双脚
def foot():# 绘制左脚color("white")begin_fill()pencolor("black")my_goto(-10, -330)seth(0)fd(10)circle(-35, 180)fd(140)circle(-35, 180)# fd(10)goto(-10,-330)end_fill()# 绘制右脚color("white")begin_fill()pencolor("black")my_goto(220, -330)seth(0)fd(10)circle(-35, 180)fd(140)circle(-35, 180)# fd(10)goto(220,-330)end_fill()
# 署名及日期落款
def auther_name():my_goto(380, 150)write('Go! GO! ---2021/12/26', font=("Bradley Hand ITC", 18, "bold"))
# 调用函数
def main():hideturtle()speed(2)pensize(3)collar()face()eyes()nose()mouse()beard()body()belly()bell()hand()foot()auther_name()exitonclick()if __name__ == '__main__':main()
time.sleep(20)   #停止20s
goto(100, -15)
seth(-110)
pendown()
fd(180)
circle(-40, 140)
time.sleep(20)  #停20秒

5.哆啦A梦

from turtle import*
import time# 设置抬笔跳跃
def my_goto(x, y):penup()goto(x, y)pendown()
# 绘制项圈
def collar():color("red")pencolor("black")begin_fill()my_goto(-100, 0)lt(10)circle(-800, 20)rt(70)fd(10)goto(-100, -10)goto(-100, 0)end_fill()
# 绘制大脸
def face():color("sky blue")pencolor("black")begin_fill()lt(46)circle(251,-293)lt(10)circle(200,273)end_fill()
# 绘制眼睛
def eyes():# 绘制左眼my_goto(-45,338)color("white")begin_fill()pencolor("black")tracer(False)a = 3rt(45)for i in range(120):if 0 <= i < 30 or 60 <= i < 90:a -= 0.05lt(3)fd(a)else:a += 0.05lt(3)fd(a)tracer(True)end_fill()# 绘制左眼球color("black")begin_fill()pencolor("black")my_goto(-5, 320)circle(15)end_fill()color("white")begin_fill()my_goto(10, 318)circle(5)end_fill()# 绘制右眼my_goto(45,338)color("white")begin_fill()pencolor("black")tracer(False)a = 3for i in range(120):if 0 <= i < 30 or 60 <= i < 90:a -= 0.05lt(3)fd(a)else:a += 0.05lt(3)fd(a)tracer(True)end_fill()# 绘制右黑眼球color("black")begin_fill()pencolor("black")my_goto(50,320)circle(15)end_fill()color("white")begin_fill()my_goto(54, 318)circle(5)end_fill()
# 绘制鼻子
def nose():pensize(3)color("red")begin_fill()pencolor("black")my_goto(4,272)circle(35)end_fill()# 绘制鼻尖color("white")begin_fill()my_goto(33, 290)circle(5)end_fill()
# 绘制嘴巴
def mouse():pencolor("black")my_goto(38,202)goto(38,50)my_goto(-110,160)lt(15)circle(150,150)
# 绘制胡子
def beard():pencolor("black")pensize(4)# 绘制左边的胡子my_goto(-120,200)goto(-20,180)my_goto(-120, 170)goto(-20,160)my_goto(-120, 130)goto(-20,140)# 绘制右边的胡子my_goto(196,200)goto(96,180)my_goto(196, 170)goto(96,160)my_goto(196, 130)goto(96,140)
# 绘制猫身
def body():color("sky blue")begin_fill()pencolor("black")# 左半边的身子my_goto(-100, -10)rt(35)fd(-180)circle(-50,-180)fd(-80)lt(50)fd(-60)fd(190)rt(30)fd(60)lt(115)fd(80)lt(10)fd(65)#机器猫的裤裆lt(90)circle(-35,190)lt(90)fd(65)rt(-10)fd(80)# 右半边的身子lt(115)fd(60)rt(35)fd(190)fd(-60)rt(60)fd(180)circle(50,180)goto(185,-10)goto(-100, -10)end_fill()
# 绘制猫肚子
def belly():color("white")pencolor("black")begin_fill()my_goto(-80,-10)seth(0)lt(80)circle(-120, -200)end_fill()my_goto(-10,-70)seth(0)lt(80)circle(-50, -200)goto(-10,-70)
# 绘制铃铛
def bell():my_goto(38,-10)seth(180)color("yellow")begin_fill()pencolor("black")circle(20)end_fill()
# 绘制双手
def hand():# 绘制左手color("white")begin_fill()pencolor("black")my_goto(-230,-125)circle(60)end_fill()# 绘制右手color("white")begin_fill()pencolor("black")my_goto(380, 50)circle(60)end_fill()
# 绘制双脚
def foot():# 绘制左脚color("white")begin_fill()pencolor("black")my_goto(-10, -330)seth(0)fd(10)circle(-35, 180)fd(140)circle(-35, 180)# fd(10)goto(-10,-330)end_fill()# 绘制右脚color("white")begin_fill()pencolor("black")my_goto(220, -330)seth(0)fd(10)circle(-35, 180)fd(140)circle(-35, 180)# fd(10)goto(220,-330)end_fill()
# 署名及日期落款
def auther_name():my_goto(380, 150)write('Go! GO! ---2021/12/26', font=("Bradley Hand ITC", 18, "bold"))
# 调用函数
def main():hideturtle()speed(2)pensize(3)collar()face()eyes()nose()mouse()beard()body()belly()bell()hand()foot()auther_name()exitonclick()if __name__ == '__main__':main()
time.sleep(20)   #停止20s

6. 螺旋线

import turtle
import time
t = turtle.Pen()
for i in range(360):t.forward(i)t.left(59)
time.sleep(30)

感谢大家,点赞,收藏,关注,评论!

python编写动漫人或物相关推荐

  1. 【python】动漫人脸检测算法汇总(lbp+mlp+hog+ssd)

    不同算法检测结果对比图 文章目录 1. 写在前面 2. 测试样例 3. 测试设备 4. 人脸检测 4.1. 基于LBP的动漫人脸检测 4.1.1. 仓库地址 4.1.2. 环境配置 4.1.3. 示例 ...

  2. python绘制动漫人物图片女生可爱_绘画动漫人物图片女生唯美

    喜欢动漫的朋友,一定也想画出唯美好看的动漫人物图片.学习啦小编特意为大家提供了绘画动漫人物女生唯美图片,如果你喜欢的话,记得分享给更多好友哦! 绘画动漫人物女生唯美图片欣赏 绘画动漫人物女生唯美图片1 ...

  3. python绘制动漫人物图片女生可爱_日本动漫人物图片女生可爱图片大全

    日本动漫一直都是动漫行业的领军者,日本是一个全民都喜欢可爱事物的国家,因此日本动漫里的可爱女生自然不在少数,下面是学习啦小编整理的日本动漫人物图片女生可爱图片大全,欢迎欣赏. 日本动漫人物图片女生可爱 ...

  4. 如何通过DCGAN实现动漫人物图像的自动生成?

    深度学习领域在近几年取得了重大突破,其中大部分研究成果都基于感知技术,计算机通过模仿人类的思维方式,感知物体.识别内容.生成对抗网络的理念由Goodfellow于2014年提出的,它的发展历程只有六年 ...

  5. 基础 | 如何通过DCGAN实现动漫人物图像的自动生成?

    点击上方"机器学习与生成对抗网络",关注"星标" 获取有趣.好玩的前沿干货! 文章来源:淘系技术 背景 基于生成对抗网络(GAN)的动漫人物生成近年来兴起的动漫 ...

  6. 使用Labelme和PaddleSeg实现动漫人物实例分割

    文章目录 前言 一.使用Labelme进行数据标注 二.使用PaddleSeg训练 1.数据集划分 2.PaddleSeg/train.py训练 3.结果可视化 4.对动漫视频进行分割 总结 前言 众 ...

  7. 深度学习之基于DCGAN实现动漫人物的生成

    注:因为硬件原因,这次的实验并没有生成图片,但是代码应该是没有问题的,可以参考学习一下. 本次基于DCGAN实现动漫人物的生成.最终的效果可以参考大神**K同学啊**的博客.与上篇文章基于DCGAN生 ...

  8. 怎么画动漫人物的五官:耳鼻眼嘴

    今天给大家带来的是动漫人物五官教程,动漫人物五官怎么画呢?下面就是动漫人物五官的详细绘画步骤,不知道怎么画动漫人物五官的童鞋,赶紧学习吧! 动漫人物五官的画法你学会了吗?学会动漫人物五官是很重要的哦

  9. 动漫人物脸型怎么画?如何画好动漫人物脸型?

    人物脸型怎么画?对于一些新手来说,可能画人物的脸非常的困难,那是因为没有掌握一定技巧的缘故,其实,我们画动漫人物的脸部,也并不是非常困难的,当然,会者不难,难者不会,为了让大家能够更好的掌握这些画动漫 ...

最新文章

  1. hadoop基本命令
  2. IOS中GPS定位偏移纠正(适用于Google地图)
  3. Top 10 Things I Know for Sure-深信不疑的十大哲理
  4. 北京/上海内推 | 字节跳动AI Lab招聘NLP算法模型优化方向实习生
  5. 工厂模式 Factory
  6. 通信开源linux,Linux环境进程间通信
  7. 1558. 得到目标数组的最少函数调用次数 二进制|思维
  8. 职场pua是什么意思,如何反职场pua,职场pua如何走出来
  9. 泛函编程(4)-深入Scala函数类
  10. 【例7.4】 循环比赛日程表
  11. 拉登游戏开发--分布式计算服务机客户机程序设计
  12. Spark RDD概念学习系列之什么是Pair RDD
  13. JJavaBean中使用JDBC方式进行事务处理
  14. adadelta算法_机器学习中的优化算法(3)-AdaGrad, Adadelta(附Python示例)
  15. 【PCL自学:Feature7】基于转动惯量和偏心量的描述符 (持续更新)
  16. Dart语言详解(一)——详细介绍
  17. 腾讯云IM集成问题汇总
  18. java斗地主发牌教学,QQ游戏“斗地主”规则说明
  19. 根据url 参数,页面显示不同背景图片
  20. (侯捷C++)1.2面向对象高级编程(上)

热门文章

  1. 纪念我的iriver T7
  2. Hadoop生态圈(三十四)- YARN WebUI服务使用指南
  3. 从源码分析线程池(池化技术)的实现原理
  4. 2021年公务员考试报名确认的具体步骤是什么?
  5. 论文翻译——vChain: Enabling Verifiable Boolean Range Queries over Blockchain Databases
  6. 微信小程序原生开发功能合集十二:编辑界面的实现
  7. 转使用mIRC下载软件电子书籍
  8. CSS字体与标签字体
  9. 让一部分人先看见未来之Flutter淘宝App
  10. 北京大学曹健——Tensorflow笔记 03 搭建神经网络