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  __getattr__与__setattr__使用方法
Sep 06 Python
使用Python进行二进制文件读写的简单方法(推荐)
Sep 12 Python
windows10下python3.5 pip3安装图文教程
Apr 02 Python
python实现网页自动签到功能
Jan 21 Python
基于Python实现用户管理系统
Feb 26 Python
Python实现数据结构线性链表(单链表)算法示例
May 04 Python
分析运行中的 Python 进程详细解析
Jun 22 Python
pytorch 加载(.pth)格式的模型实例
Aug 20 Python
Python如何实现后端自定义认证并实现多条件登陆
Jun 22 Python
Python extract及contains方法代码实例
Sep 11 Python
Python读写锁实现实现代码解析
Nov 28 Python
selenium框架中driver.close()和driver.quit()关闭浏览器
Dec 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
Zerg兵种介绍
2020/03/14 星际争霸
PHP无法访问远程mysql的问题分析及解决
2013/05/16 PHP
PHP学习笔记(一):基本语法之标记、空白、和注释
2015/04/17 PHP
PHP浮点数精度问题汇总
2015/05/13 PHP
javascript 数字格式化输出的实现代码
2013/12/10 Javascript
使用JS取得焦点(focus)元素代码
2014/03/22 Javascript
java和javascript获取word文档的书签位置对比
2014/06/19 Javascript
javascript 组合按键事件监听实现代码
2017/02/21 Javascript
vue-dialog的弹出层组件
2020/05/25 Javascript
深究AngularJS中ng-drag、ng-drop的用法
2017/06/12 Javascript
webpack配置sass模块的加载的方法
2017/07/30 Javascript
jQuery+ajax实现批量删除功能完整示例
2019/06/06 jQuery
Vue 利用指令实现禁止反复发送请求的两种方法
2019/09/15 Javascript
js+springMVC 提交数组数据到后台的实例
2019/09/21 Javascript
微信小程序button标签open-type属性原理解析
2020/01/21 Javascript
为react组件库添加typescript类型提示的方法
2020/06/15 Javascript
Vue实现腾讯云点播视频上传功能的实现代码
2020/08/17 Javascript
使用webpack和rollup打包组件库的方法
2021/02/25 Javascript
Python中的默认参数实例分析
2018/01/29 Python
python把1变成01的步骤总结
2019/02/27 Python
python异常触发及自定义异常类解析
2019/08/06 Python
Python Numpy 自然数填充数组的实现
2019/11/28 Python
python进程的状态、创建及使用方法详解
2019/12/06 Python
Python 实现一个简单的web服务器
2021/01/03 Python
美国演唱会订票网站:Ticketmaster美国
2017/10/05 全球购物
美国高档百货Nordstrom的折扣店:Nordstrom Rack
2017/11/13 全球购物
说说在weblogic中开发消息Bean时的persistent与non-persisten的差别
2013/04/07 面试题
财务部岗位职责
2013/11/19 职场文书
党支部承诺书范文
2014/03/28 职场文书
《长江之歌》教学反思
2014/04/17 职场文书
警示教育活动总结
2014/05/05 职场文书
2014年学习全国道德模范事迹思想汇报
2014/09/15 职场文书
2019让人心动的商业计划书
2019/06/27 职场文书
python保存图片的四个常用方法
2022/02/28 Python
Apache Linkis 中间件架构及快速安装步骤
2022/03/16 Servers
Python数据处理的三个实用技巧分享
2022/04/01 Python