可爱的蜡笔小新想要吗?画起来

import turtle as t

'''设置'''
t.setup(800, 500) # 创建画布并使其位于屏幕中心
t.pensize(2) # 画笔粗细
t.colormode(255) # 色彩模式
t.speed(5) # 绘画速度
t.color('black', (255, 228, 181)) # 画笔颜色与填充色
t.shape('turtle') # 画笔的形状
t.speed(5) # 画笔速度
# t.showturtle() # 使画笔显现
# 头
t.pu()
t.goto(-150, 10)
t.pd()
t.seth(0)
t.begin_fill()
t.left(135)
t.circle(-70, 85)
t.right(8)
t.circle(-85, 44)
t.left(10)
t.circle(40, 61)
t.right(15)
t.fd(20)
t.right(5)
t.circle(-40, 45)
t.left(6)
t.circle(-70, 25)
t.left(18)
t.circle(-80, 35)
t.left(10)
t.circle(-70, 27)
t.circle(-120, 54) # 耳朵
t.pu()
t.goto(82, 30)
t.pd()
t.left(140)
t.fd(20)
t.right(10)
t.circle(-20, 65)
t.seth(-50)
t.fd(5)
t.right(13)
t.circle(-50, 50)
t.right(10)
t.circle(-60, 25)
t.right(7)
t.circle(-50, 20)
t.circle(-10, 90) # 补充完整头部
t.pu()
t.goto(-150, 10)
t.pd()
t.color('black', (255, 228, 181))
t.right(130)
t.circle(90, 33)
t.right(16)
t.circle(370, 28)
t.end_fill() # 头发
t.color('black', 'black')
t.pu()
t.goto(-18, 180)
t.pd()
t.begin_fill()
t.right(30)
t.circle(-350, 19)
t.right(38)
t.circle(-300, 17)
t.left(135)
t.fd(23)
t.left(39)
t.circle(120, 63)
t.left(10)
t.circle(110, 28)
t.right(11)
t.circle(85, 14)
t.end_fill() # 眉毛
t.pu()
t.goto(-52, 151)
t.pd()
t.begin_fill()
t.right(205)
t.circle(110, 33)
t.circle(7, 130)
t.left(50)
t.circle(-110, 30)
t.circle(8, 140)
t.end_fill()
t.pu()
t.goto(48, 140)
t.pd()
t.begin_fill()
t.right(4)
t.circle(150, 18)
t.right(4)
t.circle(-6, 140)
t.right(28)
t.circle(-150, 19)
t.right(10)
t.circle(-10, 150)
t.end_fill()
t.pu()
t.goto(-69, 126)
t.pd()
t.left(70)
t.circle(-80, 37)
t.right(15)
t.circle(-25, 100)
t.pu()
t.goto(2, 91)
t.pd()
t.left(150)
t.circle(-70, 30)
t.right(10)
t.circle(-40, 60)
t.circle(-70, 20) # 眼睛
t.pu()
t.goto(-60, 110)
t.pd()
t.begin_fill()
t.right(52)
t.circle(27)
t.end_fill()
t.color('black', 'white')
t.pu()
t.goto(-45, 110)
t.pd()
t.begin_fill()
t.right(24)
t.circle(20, 80)
t.circle(7, 100)
t.seth(40)
t.fd(22)
t.left(17)
t.circle(10, 155)
t.end_fill()
t.pu()
t.goto(-20, 95)
t.pd()
t.begin_fill()
t.left(70)
t.circle(-14, 80)
t.circle(-7, 120)
t.right(44)
t.circle(35, 30)
t.end_fill()
t.pu()
t.goto(-41, 77)
t.pd()
t.begin_fill()
t.left(28)
t.circle(6)
t.end_fill()
t.color('black', 'black')
t.pu()
t.goto(-5, 55)
t.pd()
t.begin_fill()
t.left(10)
t.circle(-25)
t.end_fill()
t.color('black', 'white')
t.pu()
t.goto(5, 57)
t.pd()
t.begin_fill()
t.left(40)
t.circle(-8, 120)
t.left(30)
t.circle(-19, 80)
t.circle(-8, 120)
t.right(32)
t.circle(19, 60)
t.right(55)
t.circle(-9, 95)
t.end_fill()
t.pu()
t.goto(38, 62)
t.pd()
t.begin_fill()
t.left(190)
t.circle(-15, 50)
t.circle(-8, 100)
t.right(40)
t.circle(-10, 80)
t.end_fill()
t.pu()
t.goto(10, 50)
t.pd()
t.begin_fill()
t.circle(-5)
t.end_fill() # 嘴巴
t.pu()
t.goto(-129, 12)
t.pd()
t.circle(-40, 35)
# 身体
t.color('black', (205, 32, 32))
t.pu()
t.goto(-142, 7)
t.pd()
t.begin_fill()
t.seth(-150)
t.fd(18)
t.seth(150)
t.fd(55)
t.left(105)
t.circle(-43, 40)
t.right(125)
t.circle(-43, 30)
t.left(180)
t.circle(43, 30)
t.seth(-50)
t.fd(46)
t.circle(50, 26)
t.left(27)
t.circle(60, 50)
t.right(180)
t.circle(100, 60)
t.seth(0)
t.fd(194)
t.left(120)
t.circle(-50, 50)
t.fd(25)
t.right(20)
t.circle(34, 66)
t.circle(18, 116)
t.right(30)
t.circle(-90, 18)
t.seth(135)
t.fd(12)
t.seth(-145)
t.fd(10)
t.right(46)
t.circle(-90, 20)
t.circle(10, 100)
t.circle(-60, 20)
t.right(130)
t.circle(-50, 20)
t.left(90)
t.circle(-370, 6)
t.left(15)
t.circle(-90, 13)
t.right(7)
t.circle(-90, 18)
t.end_fill()
t.pu()
t.goto(-64, -33)
t.pd()
t.left(160)
t.circle(100, 40)
t.circle(40, 40) # 手
t.color('black', (255, 228, 181))
t.pu()
t.goto(-62, -28)
t.pd()
t.begin_fill()
t.seth(140)
t.fd(8)
t.left(77)
t.circle(-12, 150)
t.left(90)
t.fd(11)
t.circle(-4, 120)
t.right(45)
t.fd(11)
t.left(130)
t.circle(20, 35)
t.circle(-4, 140)
t.right(30)
t.circle(-20, 40)
t.left(160)
t.circle(20, 40)
t.circle(-4, 140)
t.right(20)
t.circle(-20, 50)
t.left(190)
t.circle(-20, 40)
t.circle(-3, 130)
t.left(5)
t.circle(-20, 60)
t.left(180)
t.circle(-20, 40)
t.seth(25)
t.fd(10)
t.left(240)
t.circle(-30, 30)
t.left(40)
t.circle(60, 20)
t.seth(-30)
t.fd(7)
t.seth(-125)
t.fd(25)
t.end_fill()
t.pu()
t.goto(-212, 3)
t.pd()
t.begin_fill()
t.seth(150)
t.fd(12)
t.left(90)
t.fd(8)
t.right(50)
t.circle(-9, 90)
t.left(110)
t.fd(14)
t.right(40)
t.circle(-4, 120)
t.right(15)
t.circle(-20, 40)
t.left(180)
t.circle(-3, 100)
t.left(123)
t.circle(-30, 30)
t.circle(-3, 150)
t.right(10)
t.circle(-30, 30)
t.seth(80)
t.fd(3)
t.left(72)
t.circle(30, 30)
t.right(8)
t.circle(-4, 120)
t.right(43)
t.circle(-30, 40)
t.seth(80)
t.fd(3)
t.left(70)
t.circle(30, 34)
t.right(17)
t.circle(-4, 120)
t.right(27)
t.circle(-20, 90)
t.left(180)
t.circle(-20, 50)
t.seth(35)
t.fd(8)
t.left(234)
t.circle(60, 20)
t.seth(-33)
t.circle(-50, 23)
t.seth(-119)
t.fd(16)
t.end_fill()
t.hideturtle()
t.done()

运行程序如下:

[Python急救站课程]绘制蜡笔小新图案的更多相关文章

  1. Python数据挖掘课程

    [Python数据挖掘课程]一.安装Python及爬虫入门介绍[Python数据挖掘课程]二.Kmeans聚类数据分析及Anaconda介绍[Python数据挖掘课程]三.Kmeans聚类代码实现.作 ...

  2. html5--5-14 阶段小练习:绘制太极图案

    html5--5-14 阶段小练习:绘制太极图案 学习要点 运用前几节课的知识完成一个小练习 这个图案有多种不同的绘制方法,这里只做一个简单的演示,练习的时候可以自己思考一下,尝试其他的方法,或者对这 ...

  3. Python学习课程零基础学Python

    python学习课程,零基础Python初学者应该怎么去学习Python语言编程?python学习路线这里了解一下吧.想python学习课程?学习路线网免费下载海量python教程,上班族也能在家自学 ...

  4. Java之绘制艺术图案

    前面已经介绍过绘制方法.这里不再赘述. package com.caiduping; import java.awt.Color; import java.awt.Graphics; import j ...

  5. Java之绘制五环图案

    前面已经介绍过绘制方法.这里不再赘述. package com.caiduping; import java.awt.BasicStroke; import java.awt.Color; impor ...

  6. python完整课程

    python完整课程 python课程概述 python课程大纲 链接:http://www.cnblogs.com/lx63blog/articles/9054294.html 课程结构: 1.安装 ...

  7. Python使用plotly绘制数据图表的方法

    转载:http://www.jb51.net/article/118936.htm 本篇文章主要介绍了Python使用plotly绘制数据图表的方法,实例分析了plotly绘制的技巧. 导语:使用 p ...

  8. Python入门-散点图绘制

    Python入门-散点图绘制  废话不说 直接上代码 import matplotlib.pyplot as plt x_values = list(range(1,1001)) y_values = ...

  9. 纯php实现中秋博饼游戏(1):绘制骰子图案

    最近公司中秋博饼(在厦门),自己没事也想玩玩,所以就想动手写了一个纯php实现的中秋博饼游戏,既然要纯php实现,就要用php来生成图案,所以第一步就先绘制骰子图案. 平时很少使用php绘图,不过查查 ...

  10. Python——使用matplotlib绘制柱状图

    Python——使用matplotlib绘制柱状图 1.基本柱状图           首先要安装matplotlib(http://matplotlib.org/api/pyplot_api.htm ...

随机推荐

  1. 介绍一个简易的MAUI安卓打包工具

    介绍一个简易的MAUI安卓打包工具 它可以帮助进行MAUI安卓的打包. 虽然也是用MAUI写的,但是只考虑了Windows版本,mac还不太会. 没什么高级的功能,甚至很简陋,它能做的,只是节省你从M ...

  2. java无法加载maper.xml问题

    项目依赖其他模块,模块中有 mapper,本项目也有mapper,导致项目无法正常运行. 解决办法: 1.配置 mybatis: # 搜索指定包别名 typeAliasesPackage: com.X ...

  3. #Powerbi 1分钟学会,设置有密码保护的powerbi报告

    目前,有一些朋友和笔者一样,公司暂时没有部署powerbi服务器,但是有时也需要使用powerbi共享一些看板. 如果直接将制作好的报告直接发布在公网上,又存在一定的风险,即便可能只是公布1天. 那么 ...

  4. 聊聊自然语言处理NLP

    概述 自然语言处理(NLP)的正式定义:是一个使用计算机科学.人工智能(AI)和形式语言学概念来分析自然语言的研究领域.不太正式的定义表明:它是一组工具,用于从自然语言源(如web页面和文本文档)获取 ...

  5. SpringBoot3集成Redis

    目录 一.简介 二.工程搭建 1.工程结构 2.依赖管理 3.Redis配置 三.Redis用法 1.环境搭建 2.数据类型 3.加锁机制 四.Mybatis缓存 1.基础配置 2.自定义实现 五.参 ...

  6. C#中多线程的用法

    1.在C#中使用多线程可以使用Thread 代码例子: public class ThreadExample { public static void ThreadProc() { for (int ...

  7. [ABC141E] Who Says a Pun?

    2023-02-17 题目 题目传送门 翻译 翻译 难度&重要性(1~10):4 题目来源 AtCoder 题目算法 dp,字符串 解题思路 看到求两个完全相同的子串时,我们可以发现其与求最长 ...

  8. 「AntV」x6 框选添加右键菜单

    今天在群里有个小伙伴提出了这么个问题:如何在框选完成后给框选的区域添加一个右键菜单的功能,我看到了这个问题后也是有点懵,心里想着怎么还有这个需求,直接快捷键删除不是更好吗,谁知这位小伙伴也是这么写的, ...

  9. 这个 AI 机器人会怼人,它是怎么做到的?

    近期,机器人"Ameca"接入了 Stable Diffusion,它一边与旁边的人类工程师谈笑风生,一边熟练地用马克笔在白板上画出一只简笔的猫,最后还在白板右下角签名. 当 Am ...

  10. 快速了解C#接口(Interface)

    Runoob 接口定义了所有类继承接口时应遵循的语法合同.接口定义了语法合同 "是什么" 部分,派生类定义了语法合同 "怎么做" 部分. 接口定义了属性.方法和 ...