源码:

# -*- 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)位置开始,它根据一组函数指令的控制,在这个平面坐标系中移动,从而在它爬行 ...

  10. Python turtle库绘制同心圆

    今天了解了Python中用于绘制图像的turtle库 然后发现这真的是一个很好玩的库 放上大神的有关绘图的文章 https://blog.csdn.net/zengxiantao1994/articl ...

最新文章

  1. 使用Mask-RCNN在实例分割应用中克服过拟合
  2. (转载)VS2010/MFC编程入门之一(VS2010与MSDN安装过程图解)
  3. php特殊字符转化函数,PHP函数将Unicode转换成特殊字符?
  4. JSP中嵌入java代码方式以及指令
  5. 在VS中查看MSI项目的Product Code
  6. 如何保证FTP文件下载或上传数据完整
  7. flutter 集成融云 sdk
  8. Linux安装及管理程序
  9. 如何使用Bootbox?
  10. 第一行代码读书笔记___3章
  11. crmphp_PHP开源CRM-推荐几个
  12. MATLAB地图工具箱学习总结(二)大圆和恒向线
  13. mac 重启php-fpm
  14. 利用 Python 分析城市各区域楼盘
  15. 双硬盘SSD+HDD安装双系统win10+Ubuntu16.04
  16. 转图精灵算法分析!!
  17. 非关系型数据库 之 图数据库Neo4j的使用(Python3)
  18. Linux下BMP图片添加水印
  19. 优质开源:共享图书小程序3.0 全新UI 免费下载
  20. python识别图像中的物体_python爬虫-利用百度api识别照片中的物体

热门文章

  1. Android - 开发者应该深入学习的10个开源应用项目
  2. TCP/IP协议 TCP包深入理解
  3. HttpRunnerManager接口自动化测试框架在win环境下搭建教程
  4. python2和3搭建,pip2和pip3的安装
  5. Nginx配置——禁止指定user_agent
  6. 让你此生难成大器的七宗罪
  7. virtualbox vdi extend the disk usage
  8. 修改Linux系统分区后挂载问题
  9. Linux杀100个进程,在linux bash中杀死一个进程子树
  10. c模拟linux进程管理课程设计,操作系统课程设计(三):Linux进程管理