Python代码画哆啦A梦战斗猫--Turtle画图
效果图
代码如下
import turtleturtle.speed(5)
turtle.circle(50)
turtle.begin_fill() #画头
turtle.circle(85)
turtle.fillcolor("blue")
turtle.end_fill()# turtle.penup()
# turtle.goto(0,20)
# turtle.pendown()# turtle.begin_fill()
# turtle.circle(35)
# turtle.fillcolor("white")
# turtle.end_fill()turtle.begin_fill() #画脸
turtle.circle(60)
turtle.fillcolor("white")
turtle.end_fill()turtle.penup()
turtle.goto(-20,95) #化左眼眶
turtle.pendown()
turtle.begin_fill()
turtle.circle(19)
turtle.fillcolor("white")
turtle.end_fill()turtle.penup() #画右眼眶
turtle.goto(20,95)
turtle.pendown()
turtle.begin_fill()
turtle.circle(19)
turtle.fillcolor("white")
turtle.end_fill()turtle.penup() #化左眼珠
turtle.goto(-8,111)
turtle.pendown()
turtle.begin_fill()
turtle.fillcolor("black")
turtle.circle(3)
turtle.end_fill()turtle.penup() #画右眼珠
turtle.goto(8,111)
turtle.pendown()
turtle.begin_fill()
turtle.fillcolor("black")
turtle.circle(3)
turtle.end_fill()turtle.penup() #画鼻子
turtle.goto(0,85)
turtle.pendown()
turtle.begin_fill()
turtle.circle(10)
turtle.fillcolor("red")
turtle.end_fill()turtle.goto(0,30) #画竖线turtle.penup() #左边第一根胡子
turtle.goto(-20,70)
turtle.pendown()
turtle.goto(-45,80)turtle.penup() #左边第二根胡子
turtle.goto(-20,60)
turtle.pendown()
turtle.goto(-47,60)turtle.penup() #左边第三根胡子
turtle.goto(-20,50)
turtle.pendown()
turtle.goto(-47,40)turtle.penup() #右边第三根胡子
turtle.goto(20,50)
turtle.pendown()
turtle.goto(47,40)turtle.penup() #右边第二根胡子
turtle.goto(20,60)
turtle.pendown()
turtle.goto(47,60)turtle.penup() #左边第一根胡子
turtle.goto(20,70)
turtle.pendown()
turtle.goto(45,80)turtle.penup() #右边胳膊1
turtle.goto(50,20)
turtle.pendown()
turtle.goto(100,-10)turtle.penup() #右边胳膊2
turtle.goto(50,-20)
turtle.pendown()
turtle.goto(80,-40)turtle.begin_fill()
turtle.goto(100,-10)
turtle.goto(50,20)
turtle.goto(50,-20)
turtle.goto(80,-40)
turtle.fillcolor("yellow")
turtle.end_fill()turtle.penup() #右手
turtle.goto(100,-50)
turtle.pendown()
turtle.begin_fill()
turtle.circle(20)
turtle.fillcolor("blue")
turtle.end_fill()turtle.penup() #左边胳膊1
turtle.goto(-50,20)
turtle.pendown()
turtle.goto(-100,-10)turtle.penup() #左边胳膊2
turtle.goto(-50,-20)
turtle.pendown()
turtle.goto(-80,-40)turtle.begin_fill()
turtle.goto(-100,-10)
turtle.goto(-50,20)
turtle.goto(-50,-20)
turtle.goto(-80,-40)
turtle.fillcolor("yellow")
turtle.end_fill()turtle.penup() #左手
turtle.goto(-100,-53)
turtle.pendown()
turtle.begin_fill()
turtle.circle(20)
turtle.fillcolor("blue")
turtle.end_fill()turtle.penup() #左手
turtle.goto(-50,-20)
turtle.pendown()
turtle.goto(-50,-100)turtle.penup() #左手
turtle.goto(50,-20)
turtle.pendown()
turtle.goto(50,-100)turtle.begin_fill()
turtle.penup()
turtle.goto(50,-120)
turtle.pendown()
turtle.circle(10)
turtle.fillcolor("blue")
turtle.end_fill()turtle.begin_fill()
turtle.goto(20,-120)
turtle.circle(10)
turtle.fillcolor("blue")
turtle.end_fill()turtle.penup()
turtle.goto(50,-100)
turtle.pendown()
turtle.goto(20,-100)turtle.penup()
turtle.goto(-50,-120)
turtle.pendown()
turtle.begin_fill()
turtle.circle(10)
turtle.goto(-20,-120)
turtle.circle(10)
turtle.fillcolor("blue")
turtle.end_fill()turtle.penup()
turtle.goto(-20,-100)
turtle.pendown()
turtle.goto(-50,-100)turtle.penup()
turtle.goto(-20,-100)
turtle.pendown()
turtle.goto(-20,-85)turtle.goto(20,-85)
turtle.goto(20,-100)turtle.penup()
turtle.goto(-50,-20)
turtle.pendown()turtle.begin_fill()
turtle.goto(50,-20)
turtle.goto(50,-85)
turtle.goto(-50,-85)
turtle.goto(-50,-20)
turtle.fillcolor("blue")
turtle.end_fill()turtle.penup()
turtle.goto(0,-20) #铃铛
turtle.pendown()
turtle.begin_fill()
turtle.circle(10)
turtle.fillcolor("yellow")
turtle.end_fill()turtle.penup()
turtle.goto(-10,-10)
turtle.pendown()
turtle.goto(10,-10)turtle.penup()
turtle.goto(-50,20)
turtle.pendown()
turtle.begin_fill()
turtle.goto(50,20)
turtle.goto(50,0)
turtle.goto(-50,0)
turtle.goto(-50,20)
turtle.fillcolor("red")
turtle.end_fill()turtle.penup()
turtle.goto(50,0)
turtle.pendown()
turtle.begin_fill()
turtle.circle(10)
turtle.fillcolor("red")
turtle.end_fill()turtle.penup()
turtle.goto(-50,0)
turtle.pendown()
turtle.begin_fill()
turtle.circle(10)
turtle.fillcolor("red")
turtle.end_fill()turtle.penup() #内裤
turtle.goto(-50,-70)
turtle.pendown()
turtle.begin_fill()
turtle.goto(50,-70)
turtle.goto(50,-50)
turtle.goto(-50,-50)
turtle.goto(-50,-70)
turtle.fillcolor("red")
turtle.end_fill()turtle.penup()
turtle.goto(-10,-70)
turtle.pendown()
turtle.begin_fill()
turtle.goto(-10,-85)
turtle.goto(10,-85)
turtle.goto(10,-70)
turtle.goto(-10,-70)
turtle.fillcolor("red")
turtle.end_fill()turtle.penup()
turtle.goto(-100,200)
turtle.pendown()
s = "机器猫中的战斗猫"
turtle.write(s,font = ("Arial",20,"normal"))turtle.done()
Python代码画哆啦A梦战斗猫--Turtle画图相关推荐
- python海龟画哆啦a梦_python 海龟绘图画哆啦A梦
import turtle as t #定位 def my_goto(x,y): t.up() t.goto(x,y) t.down() #眼睛 def eyes(): t.tracer(False) ...
- 用Python代码画出灰太狼
文章目录 简介 代码 运行效果 备注 简介 用python代码画出灰太狼,仅使用turtle库.如下: 绘画过程可以在下列平台查看: 抖音:用代码画灰太狼,不是一个合格的狼,但一定是合格的丈夫和父亲 ...
- 多啦a梦的python代码_分享一篇文本文档画哆啦A梦代码!
#encoding=utf-8 #Drawcat 画多啦A梦 from turtle import * # 无轨迹跳跃 def my_goto(x, y): penup() goto(x, y) pe ...
- python编程100例海绵宝宝-用python画哆啦a梦
广告关闭 2017年12月,云+社区对外发布,从最开始的技术博客到现在拥有多个社区产品.未来,我们一起乘风破浪,创造无限可能. 也收到了读者想用 python 画各种图的各种需求. 和一些读者沟通后才 ...
- 用python画哆啦a梦的身体_每天一个Python小技巧,用Python 画个多啦A梦,小猪佩奇,文末还有Python入门学习视频...
见网络上有人用Python 画出来个多啦A梦,很是新奇,来来来,我们看一下他们主要用到的库. 其实主要用的库就一个 turtle 库 先说明一下turtle绘图的基础知识: 1. 画布(canvas) ...
- 哆啦a梦简单图画python编程_哆啦a梦怎么画简单画法,哆啦a梦简笔画带颜色,超可爱...
有着神奇口袋的蓝胖子给我们的童年留下了深刻的记忆,哆啦A梦的口袋中总是能掏出各种神奇的道具帮助大雄解决遇到的困难,你是不是曾经也幻想有一个这样万能的朋友呢?今天我们为大家整理了一些哆啦A梦简笔画大全可 ...
- PHP画a梦,使用canvas画“哆啦A梦”时钟的代码
这篇文章主要介绍了JavaScript学习小结之使用canvas画"哆啦A梦"时钟的相关资料,需要的朋友可以参考下 前言:今天看完了Js书的canvas画布那张,好开心~又是心爱的 ...
- 哆啦a梦简单图画python编程_[python]画哆啦A梦,Python,绘制
from turtle import * #无轨迹跳跃 defmy_goto(x, y): penup() goto(x, y) pendown()#眼睛 defeyes(): fillcolor(& ...
- 用Python画哆啦A梦
from turtle import *# 无轨迹跳跃 def my_goto(x, y):penup()goto(x, y)pendown()# 眼睛 def eyes():fillcolor(&q ...
- 用python画哆啦a梦的头,用python画多来a梦-【Python】绘制哆啦A梦
from turtle import * #无轨迹跳跃 defmy_goto(x, y): penup() goto(x, y) pendown()#眼睛 defeyes(): fillcolor(& ...
最新文章
- LeetCode简单题之只出现一次的数字
- UOJ#179. 线性规划(线性规划)
- 【ijkplayer】编译 Android 版本的 ijkplayer ① ( Ubuntu 安装 Git 软件 | 下载 ijkplayer 代码 )
- 学习ModSecrity Handbook之摘录
- TCP/IP数据包结构分解
- Comparable和Comparator的区别
- Kafka2.0生产者客户端使用
- java 输入流可以合并吗_Java 使用IO流实现大文件的分割与合并实例详解
- 职场打怪,是不是升级越快越好?
- EDC(Enterprise Data Center 企业数据中心)
- echarts地图动画和java_echarts 实现中国地图
- 写给社区的回顾和展望:TiDB 2019, Level Up !
- 了解node、ES6
- java mp3剪切_mp3剪切器如何剪切mp3音频文件
- netron工具简单使用
- sqlite库学习(7)sqlite读取
- scp远程传输文件之权限被拒绝解决方案
- Kubernetes详解
- SQL 如何返回最大值所在的多条记录
- 设备驱动程序是什么?为什么要有设备驱动程序?用户进程怎样使用驱动程序?