python画微信表情符的实例代码


Posted in Python onOctober 09, 2019
#@project = facepalm
#@file = main
#@author = Maoliang Ran
#@create_time = 2018/8/28 22:57
import turtle
# 画指定的任意圆弧
def arc(sa,ea,x,y,r):#start angle,end angle,circle center,radius
  turtle.penup()
  turtle.goto(x,y)
  turtle.setheading(0)
  turtle.left(sa)
  turtle.fd(r)
  turtle.pendown()
  turtle.left(90)
  turtle.circle(r,(ea-sa))
  return turtle.position()
turtle.hideturtle()
#画脸
turtle.speed(5)
turtle.setup(900,600,200,200)
turtle.pensize(5)
turtle.right(90)
turtle.penup()
turtle.fd(100)
turtle.left(90)
turtle.pendown()
turtle.begin_fill()
turtle.pencolor("#B26A0F")#head side color
turtle.circle(150)
turtle.fillcolor("#F9E549")#face color
turtle.end_fill()
#画嘴
turtle.penup()
turtle.goto(77,20)
turtle.pencolor("#744702")
turtle.goto(0,50)
turtle.right(30)
turtle.fd(110)
turtle.right(90)
turtle.pendown()
turtle.begin_fill()
turtle.fillcolor("#925902")#mouth color
turtle.circle(-97,160)
turtle.goto(92,-3)
turtle.end_fill()
turtle.penup()
turtle.goto(77,-25)
#画牙齿
turtle.pencolor("white")
turtle.begin_fill()
turtle.fillcolor("white")
turtle.goto(77,-24)
turtle.goto(-81,29)
turtle.goto(-70,43)
turtle.goto(77,-8)
turtle.end_fill()
turtle.penup()
turtle.goto(0,-100)
turtle.setheading(0)
turtle.pendown()
#画左边眼泪
turtle.left(90)
turtle.penup()
turtle.fd(150)
turtle.right(60)
turtle.fd(-150)
turtle.pendown()
turtle.left(20)
turtle.pencolor("#155F84")#tear side color
turtle.fd(150)
turtle.right(180)
position1=turtle.position()
turtle.begin_fill()
turtle.fillcolor("#7EB0C8")#tear color
turtle.fd(150)
turtle.right(20)
turtle.left(270)
turtle.circle(-150,18)
turtle.right(52)
turtle.fd(110)
position2=turtle.position()
turtle.goto(-33,90)
turtle.end_fill()
#画右边眼泪
turtle.penup()
turtle.goto(0,0)
turtle.setheading(0)
turtle.left(90)
turtle.fd(50)
turtle.right(150)
turtle.fd(150)
turtle.left(150)
turtle.fd(100)
turtle.pendown()
turtle.begin_fill()
turtle.fd(-100)
turtle.fillcolor("#7EB0C8")#tear color
turtle.right(60)
turtle.circle(150,15)
turtle.left(45)
turtle.fd(66)
turtle.goto(77,20)
turtle.end_fill()
#画眼睛
turtle.penup()
turtle.pencolor("#6C4E00")#eye color
turtle.goto(-65,75)
turtle.setheading(0)
turtle.left(27)
turtle.fd(38)
turtle.pendown()
turtle.begin_fill()
turtle.fillcolor("#6C4E00")#eye color
turtle.left(90)
turtle.circle(38,86)
turtle.goto(position2[0],position2[1])
turtle.goto(position1[0],position1[1])
turtle.end_fill()
#画手
turtle.pencolor("#D57E18")#hand side color
turtle.begin_fill()
turtle.fillcolor("#EFBD3D")#hand color
#第一个手指
arc(-110,10,110,-40,30)
turtle.circle(300,35)
turtle.circle(13,120)
turtle.setheading(-50)
turtle.fd(20)
turtle.setheading(130)
#第二个手指
turtle.circle(200,15)
turtle.circle(12,180)
turtle.fd(40)
turtle.setheading(137)
#第三个手指
turtle.circle(200,16)
turtle.circle(12,160)
turtle.setheading(-35)
turtle.fd(45)
turtle.setheading(140)
#第四个手指
turtle.circle(200,13)
turtle.circle(11,160)
turtle.setheading(-35)
turtle.fd(40)
turtle.setheading(145)
#第五个手指
turtle.circle(200,9)
turtle.circle(10,180)
turtle.setheading(-31)
turtle.fd(50)
#画最后手腕的部分
turtle.setheading(-45)
turtle.pensize(7)
turtle.right(5)
turtle.circle(180,35)
turtle.end_fill()
turtle.begin_fill()
turtle.setheading(-77)
turtle.pensize(5)
turtle.fd(50)
turtle.left(-270)
turtle.fd(7)
turtle.pencolor("#EFBD3D")
turtle.circle(30,180)
turtle.end_fill()
#测试
# res=arc(70,220,90,50,300)
# print(res[0],res[1])
turtle.done()

python画微信表情符的实例代码

总结

以上所述是小编给大家介绍的python画微信表情符的实例代码,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对三水点靠木网站的支持!
如果你觉得本文对你有帮助,欢迎转载,烦请注明出处,谢谢!

Python 相关文章推荐
用Python写的图片蜘蛛人代码
Aug 27 Python
Python 随机生成中文验证码的实例代码
Mar 20 Python
DJANGO-ALLAUTH社交用户系统的安装配置
Nov 18 Python
Python导出数据到Excel可读取的CSV文件的方法
May 12 Python
神经网络理论基础及Python实现详解
Dec 15 Python
python检测空间储存剩余大小和指定文件夹内存占用的实例
Jun 11 Python
基于python历史天气采集的分析
Feb 14 Python
Python如何使用k-means方法将列表中相似的句子归类
Aug 08 Python
Python中函数的返回值示例浅析
Aug 28 Python
Python 实现opencv所使用的图片格式与 base64 转换
Jan 09 Python
Python实现UDP程序通信过程图解
May 15 Python
Python 实现将numpy中的nan和inf,nan替换成对应的均值
Jun 08 Python
PyCharm专业最新版2019.1安装步骤(含激活码)
Oct 09 #Python
python脚本实现音频m4a格式转成MP3格式的实例代码
Oct 09 #Python
python图像处理模块Pillow的学习详解
Oct 09 #Python
Python 中pandas索引切片读取数据缺失数据处理问题
Oct 09 #Python
详解python路径拼接os.path.join()函数的用法
Oct 09 #Python
Django Docker容器化部署之Django-Docker本地部署
Oct 09 #Python
Python3实现zip分卷压缩过程解析
Oct 09 #Python
You might like
PHP 输出简单动态WAP页面
2009/06/09 PHP
一道关于php变量引用的面试题
2010/08/08 PHP
ThinkPHP模版中导入CSS和JS文件的方法
2014/11/29 PHP
PHP实现的memcache环形队列类实例
2015/07/28 PHP
PHP程序中的文件锁、互斥锁、读写锁使用技巧解析
2016/03/21 PHP
如何实现JS函数的重载
2006/09/22 Javascript
javascript 学习笔记(八)javascript对象
2011/04/12 Javascript
jQuery插件开发详细教程
2014/06/06 Javascript
JavaScript函数的一些注意要点小结及js匿名函数
2015/11/10 Javascript
JS仿百度自动下拉框模糊匹配提示
2016/07/25 Javascript
JavaScript面试题(指针、帽子和女朋友)
2016/11/23 Javascript
BootStrap实现带关闭按钮功能
2017/02/15 Javascript
vue基于Vue2.0和高德地图的地图组件实例
2017/04/28 Javascript
在vue-cli 3中给stylus、sass样式传入共享的全局变量
2019/08/12 Javascript
ckeditor一键排版功能实现方法分析
2020/02/06 Javascript
vue实现点击按钮“查看详情”弹窗展示详情列表操作
2020/09/09 Javascript
JavaScript实现4位随机验证码的生成
2021/01/28 Javascript
[01:26]神话结束了,却也刚刚开始——DOTA2新英雄玛尔斯驾临战场
2019/03/10 DOTA
[56:42]VP vs RNG 2019国际邀请赛小组赛 BO2 第二场 8.15
2019/08/17 DOTA
Python升级提示Tkinter模块找不到的解决方法
2014/08/22 Python
Python本地与全局命名空间用法实例
2015/06/16 Python
python通过pip更新所有已安装的包实现方法
2017/05/19 Python
开源软件包和环境管理系统Anaconda的安装使用
2017/09/04 Python
Python3实现的字典、列表和json对象互转功能示例
2018/05/22 Python
如何在Django中使用聚合的实现示例
2020/03/23 Python
Python如何实现的二分查找算法
2020/05/27 Python
Roxy美国官网:澳大利亚冲浪、滑雪健身品牌
2016/07/30 全球购物
eBay加拿大站:eBay.ca
2019/06/20 全球购物
工会文体活动总结
2015/05/07 职场文书
祝寿主持词
2015/07/02 职场文书
2015年社区消防安全工作总结
2015/10/14 职场文书
小学英语课教学反思
2016/02/15 职场文书
小学四年级作文之写景
2019/08/23 职场文书
Go 语言下基于Redis分布式锁的实现方式
2021/06/28 Golang
Redis分布式锁Redlock的实现
2021/08/07 Redis
JavaWeb Servlet开发注册页面实例
2022/04/11 Java/Android