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基础教程之实现石头剪刀布游戏示例
Feb 11 Python
Python学习笔记_数据排序方法
May 22 Python
python搜索指定目录的方法
Apr 29 Python
Python使用re模块正则提取字符串中括号内的内容示例
Jun 01 Python
python实现字符串中字符分类及个数统计
Sep 28 Python
Python HTML解析器BeautifulSoup用法实例详解【爬虫解析器】
Apr 05 Python
Python函数中参数是传递值还是引用详解
Jul 02 Python
Django在pycharm下修改默认启动端口的方法
Jul 26 Python
pandas的to_datetime时间转换使用及学习心得
Aug 11 Python
Python Sympy计算梯度、散度和旋度的实例
Dec 06 Python
Python2与Python3的区别点整理
Dec 12 Python
Django debug为True时,css加载失败的解决方案
Apr 24 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读取javascript设置的cookies的代码
2010/04/12 PHP
php使用正则表达式进行字符串搜索的方法
2015/03/23 PHP
ThinkPHP开发框架函数详解:C方法
2015/08/14 PHP
Thinkphp 中 distinct 的用法解析
2016/12/14 PHP
PHP中Notice错误常见解决方法
2017/04/28 PHP
Yii2 queue的队列使用详解
2019/07/19 PHP
Javascript结合css实现网页换肤功能
2009/11/02 Javascript
js获取单元格自定义属性值的代码(IE/Firefox)
2010/04/05 Javascript
jQuery 源码分析笔记(5) jQuery.support
2011/06/19 Javascript
Jquery增加鼠标中间功能mousewheel的实例代码
2013/09/05 Javascript
js Date概念详细介绍
2013/11/22 Javascript
javaScript如何处理从java后台返回的list
2014/04/24 Javascript
js获取鼠标点击的位置实现思路及代码
2014/05/09 Javascript
30个经典的jQuery代码开发技巧
2014/12/15 Javascript
JS获取iframe中marginHeight和marginWidth属性的方法
2015/04/01 Javascript
详解JavaScript中localStorage使用要点
2016/01/13 Javascript
jQuery插件ImgAreaSelect实现头像上传预览和裁剪功能实例讲解一
2017/05/26 jQuery
node.js学习之事件模块Events的使用示例
2017/09/28 Javascript
axios取消请求的实践记录分享
2018/09/26 Javascript
详解微信小程序scroll-view横向滚动的实践踩坑及隐藏其滚动条的实现
2019/03/14 Javascript
vue+Element-ui实现分页效果
2020/11/15 Javascript
[03:14]DOTA2斧王 英雄基础教程
2013/11/26 DOTA
python多线程实现TCP服务端
2019/09/03 Python
详解用Pytest+Allure生成漂亮的HTML图形化测试报告
2020/03/31 Python
CSS3新增布局之: flex详解
2020/06/18 HTML / CSS
毕业自我评价范文
2013/11/17 职场文书
法警的竞聘演讲稿
2014/01/02 职场文书
给老婆大人的检讨书
2014/02/24 职场文书
五五普法心得体会
2014/09/04 职场文书
群众路线查摆问题整改措施思想汇报
2014/10/10 职场文书
医院科室评语
2015/01/04 职场文书
清明节扫墓活动总结
2015/02/09 职场文书
2015年基层党支部工作总结
2015/05/21 职场文书
工作转正自我鉴定范文
2019/06/21 职场文书
导游词书写之黄山
2019/08/06 职场文书
MySQL 四种连接和多表查询详解
2021/07/16 MySQL