源码:

# -*- coding: utf-8 -*- from turtle import *
import turtlespeed(0)
penup()
seth(180)
fd(200)
seth(0)
penup()  #外圈头
circle(150, 40)
pendown()
fillcolor('dodgerblue')
begin_fill()
circle(150, 280)
end_fill()  #外圈头
fillcolor("red")
begin_fill()  #外圈头
seth(0)           #项圈
fd(200)
circle(-5,90)
fd(10)
circle(-5,90)
fd(210)
circle(-5,90)
fd(10)
circle(-5,90)
end_fill()     #项圈
fd(183)   #右脸
left(45)
fillcolor("white")
begin_fill()
circle(120,100)
seth(90)  #眼睛
a = 2.5
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)
penup()
seth(180)
fd(60)
pendown()
seth(90)
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)  #眼睛
seth(180)
penup()
fd(60)
pendown()
seth(215)
circle(120,100)
end_fill()   #脸部颜色和眼睛部分
seth(0)    # 左眼珠部分
penup()
fd(40)
seth(90)
fd(170)
seth(0)
fd(5)
pendown()
fillcolor("black")
begin_fill()
circle(15,360)
end_fill()
seth(90)
penup()
fd(5)
pendown()
seth(0)
fillcolor("white")
begin_fill()
circle(4,360)
end_fill()     #左眼珠部分
penup()   #右眼珠
seth(0)
fd(58)
seth(270)
fd(15)
seth(0)
pensize(5)
circle(18,90)
pendown()
circle(18,180)
penup()
circle(18,90)
pendown()
pensize(1)#右眼珠
penup()   #鼻子
seth(270)
fd(7)
seth(180)
fd(27)
pendown()
fillcolor("red")
begin_fill()
circle(20)
end_fill()#鼻子
seth(270)#嘴
penup()
fd(40)
pendown()
pencolor("black")
pensize(2)
fd(90)
seth(0)
circle(120,50)
penup()
circle(120,260)
pendown()
circle(120,50)#嘴
penup()     #胡须
seth(90)
fd(60)
seth(0)
fd(20)
pendown()
fd(60)
penup()
fd(-60)
seth(90)
fd(20)
pendown()
seth(15)
fd(60)
penup()
fd(-60)
seth(270)
fd(40)
pendown()
seth(-15)
fd(50)
penup()
fd(-50)
seth(180)
fd(40)
pendown()
seth(-165)
fd(50)
penup()
fd(-50)
seth(90)
fd(40)
seth(165)
pendown()
fd(60)
fd(-60)
penup()
seth(280)
fd(20)
seth(180)
pendown()
fd(60)        #胡须
penup()  #下半身
home()
penup()
seth(180)
fd(200)
seth(0)
seth(90)
fd(36)
seth(0)
fd(98)
pendown()
fillcolor("dodgerblue")
begin_fill()
seth(50)
fd(70)
seth(40)
fd(20)
right(90)
fd(35)
right(75)
fd(105)
seth(90)
fd(10)
seth(-90)
fd(90)
seth(-95)
fd(80)
seth(180)
fd(80)    # 右腿
penup()  #左腿和过渡
fd(30)
seth(-90)
fd(30)
seth(0)
circle(30,90)
pendown()
circle(30,180)
penup()
circle(30,90)
seth(90)
fd(30)
seth(180)
fd(30)
pendown()
fd(80)   #腿
seth(92)
fd(80)
seth(90)
fd(75)
fd(-30)
seth(-135)
fd(30)
right(90)
fd(40)
right(93)
fd(78)
seth(0)
fd(205)
end_fill()
fillcolor("red")# 项圈的补充
begin_fill()
circle(5,90)
fd(10)
circle(5,90)
fd(10)
end_fill()
penup()
seth(50)
fd(70)
seth(40)
fd(16)
right(90)
fd(20)
pendown()
fillcolor("white")# 手掌
begin_fill()
circle(30)
end_fill()
penup()
seth(-90)
fd(253)
seth(180)
fd(160)
seth(-90)
fd(30)
seth(0)
pendown()
fillcolor("white")
begin_fill()
penup()
circle(31,90)
pendown()
circle(31,180)
penup()
circle(31,90)
end_fill()
seth(90)
fd(30)
seth(0)
fd(24)
pendown()
seth(180)
circle(15,180)# 脚
fd(90)
circle(15,180)
fd(90)
penup()
seth(180)
fd(60)
penup()
seth(0)
pendown()
circle(-15,180)
fd(80)
circle(-15,180)
fd(80)
penup()
seth(180)
fd(140)
seth(90)
fd(90)
seth(-45)
pendown()
fillcolor("white")
begin_fill()
circle(30)
end_fill()
penup()
seth(-90)
fd(50)
seth(0)
fd(173)
seth(0)
fillcolor("white")#  胸
begin_fill()
pendown()
circle(90,128)
seth(180)
fd(145)
seth(-128)
circle(90,129)
end_fill()
seth(90)
penup()
fd(35)
seth(0)
pendown()
circle(70,90)# 口袋
seth(180)
fd(140)
seth(-90)
circle(70,90)
penup()
seth(90)
fd(90)
pendown()
seth(0)
fillcolor("#ffd200")#铃铛
begin_fill()
circle(20)
end_fill()
seth(90)
pensize(2)
fd(13)
fillcolor("black")
begin_fill()
seth(0)
circle(2)
end_fill()
seth(-90)
fd(13)
seth(0)
penup()
circle(20,110)
pendown()
seth(170)
fd(20)
seth(190)
fd(20)
penup()
seth(-90)
fd(3.5)
pendown()
seth(10)
fd(20)
seth(-10)
fd(22)#大雄部分
pensize(1)
penup()
seth(0)
fd(400)
pendown()
speed(0)
fillcolor("black")
begin_fill()
seth(30)
circle(100,60)
fd(20) #右脸
seth(50)
circle(50,150)
seth(70)
fd(4)
seth(50)
fd(4)
fd(-4)
seth(70)
fd(-4)
seth(145)
fd(5)
seth(138)
fd(5)
fd(-5)
seth(145)
fd(-5)
seth(150)
circle(60,150)
seth(-90)
fd(20)
circle(84,92)
end_fill()
penup()
seth(90)
fd(110)
seth(0)
fd(50)
fillcolor("#FAFAD2")
begin_fill()
pendown()#发际线
seth(85)
fd(20)
seth(160)
fd(20)
seth(165)
fd(20)
seth(170)
fd(10)
seth(175)
fd(20)
seth(180)
fd(10)
seth(185)
fd(20)
seth(190)
fd(20)
seth(195)
fd(10)
seth(200)
fd(14.5)
seth(-85)
fd(30)#发际线
seth(-90)
fd(20)
circle(84,92)
seth(30)
circle(100.5,60)
fd(30)
end_fill()#脸的补全
penup()
seth(-90)
fd(10)
pendown()
fillcolor("#FAFAD2")
begin_fill()
seth(80)
circle(-8,190)
seth(-90)
fd(5)
seth(-95)
fd(5)
seth(-100)
fd(5)
seth(-105)
fd(5)
seth(-110)
fd(5)
circle(-8,135)
penup()
seth(90)
fd(15)
seth(0)
fd(3)
pendown()seth(60)
fd(8)
seth(70)
fd(8)
fd(-8)
seth(70)
circle(-5,180)
seth(-120)
fd(14)
end_fill()
penup()
seth(180)
fd(142)
seth(90)
fd(23)
pendown()
fillcolor("#FAFAD2")
begin_fill()
seth(100)
circle(8,180)
seth(-90)
fd(6)
seth(-85)
fd(6)
seth(-80)
fd(6)
circle(8,140)
end_fill()
seth(100)
fd(20)
circle(5,210)
fd(7)
penup()
seth(0)
fd(142)
seth(90)
fd(9)
pendown()
seth(180)
fd(18)
seth(90)
fillcolor("white")
begin_fill()
a = 2.3
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)penup()
seth(180)
fd(50)
seth(90)
pendown()
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)
end_fill()
seth(180)
penup()
fd(70)
pendown()
seth(0)
fd(20)
penup()
fd(34)
seth(-90)
fd(2)
pendown()
pensize(6)
circle(4)
penup()
seth(0)
fd(26)
seth(-90)
fd(2.5)
seth(0)
pendown()
circle(4)
pensize(2)
penup()
seth(90)
fd(40)
seth(0)
fd(15)
seth(30)
pendown()
fd(8)
seth(0)
fd(10)
seth(-40)
fd(15)
seth(-50)
fd(7)
seth(-60)
fd(7)
penup()
seth(180)
fd(95)
seth(90)
fd(25)
pendown()
seth(-145)
fd(10)
seth(-135)
fd(5)
seth(-125)
fd(5)
seth(-120)
fd(5)
seth(-115)
fd(5)
seth(-110)
fd(5)
penup()
seth(90)
fd(30)
seth(0)
fd(25)
pendown()
seth(-30)
fd(19)
penup()
pensize(1)
seth(0)
fd(13)
seth(-90)
fd(81)
seth(0)
pendown()
circle(8)
penup()
seth(-90)
fd(20)
seth(180)
fd(10)
seth(160)
pendown()
fd(25)
fd(-25)
seth(-15)
fd(5)
seth(-10)
fd(5)
seth(0)
fd(5)
seth(10)
fd(5)
seth(15)
fd(5)
seth(20)
fd(27)
seth(-90)
penup()
fd(25)
seth(180)
fd(36)
seth(0)
pendown()
fillcolor("white")
begin_fill()
circle(68.5,75)
seth(-105)
circle(-68.5,75)
circle(-72.5,78)
penup()
seth(-90)
fd(100)
seth(0)
fd(133)
seth(90)
fd(85)
end_fill()
fillcolor("#FAFAD2")
begin_fill()
seth(-160)
fd(104)
seth(0)
fd(38)
seth(-90)
fd(7.5)
pendown()
seth(0)
circle(66,76)
end_fill()
penup()
seth(180)
fd(80)
seth(-90)
fd(33.5)
pendown()
seth(-15)
fd(5)
seth(-10)
fd(5)
seth(0)
fd(5)
seth(10)
fd(5)
seth(15)
fd(5)
seth(20)
fd(27)
penup()
seth(180)
fd(12)
seth(-90)
fd(21)
pendown()
fillcolor("#FAFAD2")
begin_fill()
fd(12)
seth(180)
fd(46)
seth(90)
fd(11)
penup()
seth(-30)
fd(5)
seth(-20)
fd(5)
seth(-10)
fd(5)
seth(0)
fd(5)
pendown()
circle(73,27)
end_fill()
penup()
seth(-90)
fd(6)
seth(180)
fd(5)
pendown()
fillcolor("white")
begin_fill()
seth(-50)
fd(12)
seth(-100)
fd(30)
seth(135)
fd(40)
seth(-135)
fd(40)
seth(100)
fd(30)
seth(45)
fd(16)
end_fill()
fillcolor("#EEC900")
begin_fill()
fd(-16)
seth(-145)
fd(40)
circle(20,45)
fd(10)
left(10)
fd(5)
right(10)
fd(10)
left(90)
fd(25)
seth(85)
fd(25)
seth(75)
fd(10)
fd(-10)
seth(85)
fd(-25)
seth(-90)
fd(15)
seth(-85)
fd(18)
seth(0)
fd(95)
circle(6,180)
seth(90)
fd(30)
seth(95)
fd(35)
fd(-30)
right(90)
fd(25)
left(80)
fd(6)
left(6)
fd(6)
left(12)
fd(20)
circle(20,60)
fd(20)
end_fill()
penup()
seth(180)
fd(54)
seth(90)
fd(10)
pendown()
fillcolor("#FAFAD2")
begin_fill()
seth(-90)
fd(10)
seth(0)
fd(48)
seth(90)
fd(10)
end_fill()
seth(180)
penup()
fd(24)
pendown()
circle(-160,13)
seth(-13)
circle(160,13)
seth(0)
circle(160,12)
penup()
seth(-90)
fd(12)
seth(180)
fd(3)
pendown()
fillcolor("white")
begin_fill()
seth(-100)
fd(30)
seth(135)
fd(40)
seth(-135)
fd(40)
seth(100)
fd(26)
end_fill()
penup()
seth(0)
fd(20)
seth(90)
fd(2)
pendown()
seth(0)
fd(41)
penup()
seth(0)
fd(40)
seth(-90)
fd(53)
pendown()
fillcolor("#FAFAD2")
begin_fill()
seth(-80)
fd(60)
seth(-30)
fd(5)
seth(-40)
fd(5)
seth(-50)
fd(5)
seth(-60)
fd(5)
seth(-80)
fd(5)
seth(-90)
fd(5)
seth(-95)
fd(5)
seth(-135)
fd(6)
seth(-138)
fd(6)
seth(-143)
fd(6)
circle(-15,160)
seth(180)
circle(20,20)
seth(95)
fd(80)
end_fill()
penup()
fd(-90)
seth(0)
fd(20)
pendown()
seth(-70)
fd(10)
fd(-10)
penup()
seth(0)
fd(8)
seth(-70)
pendown()
fd(7)
fd(-7)
penup()
seth(0)
fd(8)
seth(-70)
fd(-10)
pendown()
fd(13)
penup()
seth(180)
fd(165)
seth(90)
fd(82)
seth(-95)
fillcolor("#FAFAD2")
begin_fill()
pendown()
fd(80)
seth(-150)
circle(20,190)
seth(145)
fd(10)
left(90)
fd(6)
fd(-14)
fd(8)
right(90)
fd(-7)
seth(45)
circle(20,80)
seth(85)
fd(85)
end_fill()penup()
seth(-90)
fd(35)
seth(0)
fd(3)
pendown()
fillcolor("#FAFAD2")
begin_fill()
seth(-105)
fd(10)
seth(-87)
fd(70)
seth(-90)
fd(70)
seth(-145)
fd(20)
circle(10,160)
seth(0)
fd(50)
circle(5,110)
fd(20)
seth(90)
fd(50)
seth(87)
fd(60)
circle(-6,175)
fd(60)
seth(-90)
fd(50)
seth(-120)
fd(18)
circle(5,130)
seth(0)
fd(50)
circle(10,160)
fd(16)
seth(90)
fd(70)
seth(87)
fd(80)
end_fill()
penup()
seth(90)
fd(1)
fillcolor("#FF3E96")
begin_fill()
pendown()
seth(180)
fd(96)
seth(-105)
fd(10)
seth(-87)
fd(45)
seth(0)
fd(43)
seth(87)
fd(13)
circle(-6,175)
seth(-90)
fd(15)
seth(0)
fd(40)
end_fill()
penup()
seth(-90)
fd(98)
seth(180)
fd(40)
pendown()
seth(-10)
fd(15)
seth(0)
fd(15)
seth(10)
fd(15)
penup()
seth(180)
fd(62)
pendown()
seth(-170)
fd(15)
seth(180)
fd(15)
seth(-190)
fd(15)#末尾加上这一行,不然画完后会闪退
turtle.done()# hideturtle()

效果图:


基于Python-turtle库绘制哆啦A梦和大雄在一起相关推荐

  1. Python Turtle库绘制小黄脸表情包

    Python Turtle库绘制小黄脸表情包 下面只有一个表情的代码 #!/usr/bin/env python # -*- coding:utf-8 -*- __author__: "TC ...

  2. Python turtle库绘制复杂漫威蜘蛛侠Spiderman

    演示效果 点击播放:Python123平台 济南大学_盛亚琪_spiderman (https://www.python123.io/index/turtles/5c95d01e24577506dc7 ...

  3. python画图哆啦a梦大头贴_用python的turtle库画哆啦A梦大头贴

    原博文 2019-05-15 22:14 − 点击此处观看视频 源代码: 1 from turtle import * 2 speed(10) 3 pensize(3) 4 hideturtle() ...

  4. python画图哆啦a梦-Python—turtle画图(哆啦A梦)

    [知识延伸] 在Python中有一个名为turtle的工具,也可以称他为画图工具,这是一种Python所独有的工具.是他为我们所包装好的模块,在这里 [要求] 今天我们利用turtle画图来绘制一个哆 ...

  5. python random库画多彩蟒蛇,Python Turtle库绘制蟒蛇

    使用Python Turtle库来绘制蟒蛇 import turtle引入了海龟绘图体系 使用setup函数,设定了一个宽650像素和高350像素的窗体,其位置左上角坐标是200,200 说明位置在距 ...

  6. 使用python turtle库绘制一个三角形_使用turtle库绘制一个叠加等边三角形,图形效果如下:...

    原博文 2020-09-14 23:11 − import turtle turtle.setup(650,350,200,200) turtle.penup() turtle.pensize(1) ...

  7. 用python的turtle库画哆啦A梦大头贴

    20181801058,褚志远 20180301121,周晨 思路来源:1.当初搜过能用turtle画什么,其中有哆啦A梦 2.可爱,不算太复杂,适合菜鸟(like me) 突然发现画多拉阿梦的还不少 ...

  8. 用Python turtle库绘制蟒蛇

    Python的函数库 Python语言与C语言Java类似,可以大量使用外部函数库包含在安装包中的函数库:. 比如math, random, turtle等其他函数库,其他函数库用户根据代码需求自行安 ...

  9. 用Python turtle库 绘制皮卡丘

    Turtle库是Python语言中一个很流行的绘制图像的函数库,想象一个小乌龟,在一个横轴为x.纵轴为y的坐标系原点,(0,0)位置开始,它根据一组函数指令的控制,在这个平面坐标系中移动,从而在它爬行 ...

最新文章

  1. Linux 基础学习(第一节)
  2. 关于PrintQueueCollection()类,跨线程调用错误“线程无法访问此对象,因为另一个线程拥有该对象”
  3. YbtOJ-大收藏家【分层图,最大流】
  4. 【Python】内置os.path模块最常用的一些用法
  5. 不同用户同时并发测压_教你 7 招,迅速提高服务器并发能力!
  6. H5JS二维动画制作!two.js的基本操作class2
  7. Mp3原理及文件格式解析(from)
  8. 实验九 哈希表的查找操作
  9. java文字段落排版,文字排版相关
  10. 查看文件的MD5值得方法 (校验完整性)
  11. Zigbee和WiFi的信道重叠
  12. 用python生成密码本(不同模式不同密码)
  13. CUE 文件格式说明
  14. 心灵奇旅最触动我的一段
  15. 单独使用Quartz 2.1.7 时Job属性Spring无法注入
  16. 2008-09赛季NBA直播表(cctv5 广东体育)
  17. 分享两个小技巧,让你的PPT看起来更高级
  18. 如何解决安装CCS 10 时 Unicode Character Check 报错
  19. 语义分割--Dilated Residual Networks
  20. 易语言5.7完美版 全套视频学习教程

热门文章

  1. TypeScript 再次发布一个奇怪的版本:3.3.4000
  2. Mysql用户管理(远程连接、授权)
  3. postfix只能发邮件,不能接收从其他邮箱发送的邮件 451 4.3.5 Server conf
  4. 人人都会设计模式---代理模式--Proxy
  5. 源头防堵信息泄露 监管拟全面推行支付标记化
  6. jenkins + Git 搭建持续集成环境
  7. Linux 网卡设备驱动程序设计(3)
  8. linux下repair filesystem模式修复方法
  9. WCF Ria Service“操作失败,指定的命名链接在配置中找不到”错误解决方法
  10. ThreadLocal分析学习