python turtle库 简单图形-中国结
2018-06-02 16:47
204 查看
代码执行效果
import turtle turtle.screensize(600,800) turtle.pensize(10) turtle.pencolor("red") turtle.seth(-45) turtle.fd(102) turtle.circle(-6,180) turtle.fd(102) turtle.circle(6,180) turtle.fd(102) turtle.circle(-6,180) turtle.fd(102) turtle.circle(6,180) turtle.fd(102) turtle.circle(-6,180) turtle.fd(102) turtle.circle(6,180) turtle.fd(92) turtle.circle(-6,270) turtle.fd(92) turtle.circle(6,180) turtle.fd(102) turtle.circle(-6,180) turtle.fd(102) turtle.circle(6,180) turtle.fd(102) turtle.circle(-6,180) turtle.fd(102) turtle.circle(6,180) turtle.fd(102) turtle.circle(-6,180) turtle.fd(88) turtle.fd(20) turtle.seth(135) turtle.fd(20) turtle.seth(225) turtle.fd(20) turtle.seth(315) turtle.fd(20) turtle.seth(45) turtle.fd(20) turtle.seth(135) turtle.begin_fill() turtle.fillcolor("red") turtle.fd(50) turtle.seth(45) turtle.fd(30) turtle.seth(-45) turtle.fd(30) turtle.seth(225) turtle.fd(30) turtle.end_fill() turtle.seth(90) turtle.fd(40) turtle.pensize(20) turtle.fd(10) turtle.pensize(5) turtle.seth(105) turtle.fd(30) turtle.circle(-8,240) turtle.circle(20,20) turtle.fd(5) turtle.circle(20,60) turtle.fd(25) turtle.penup() turtle.setx(0) turtle.sety(0) turtle.goto(2,-127) turtle.pendown() turtle.pensize(5) turtle.begin_fill() turtle.fillcolor("red") turtle.seth(0) turtle.fd(15) turtle.seth(-90) turtle.fd(10) turtle.seth(180) turtle.fd(15) turtle.seth(90) turtle.fd(10) turtle.seth(0) turtle.fd(15) turtle.end_fill() turtle.pensize(2) for x in range(6): turtle.seth(-90) turtle.fd(50) turtle.penup() turtle.seth(90) turtle.fd(50) turtle.seth(180) turtle.fd(3) turtle.pendown()
阅读更多
相关文章推荐
- 使用Python中的Turtle库绘制简单的图形
- python opencv 绘制简单图形
- 【语言-Python】Turtle Screen简单消息处理
- 【Python学习】之 简单图形编程
- python中turtle(海龟)模块的简单用法
- python中的turtle库绘制图形
- Python验证码识别:利用pytesser识别简单图形验证码
- 使用Python的turtle模块画出最简单的五角星
- Python验证码识别:利用pytesser识别简单图形验证码
- 一个简单的抓取中国城市空气质量的python包chinaAQI
- Python游戏开发-05-提高游戏颜值-04-绘制简单图形
- linuxcnc python 简单的图形界面
- 利用python中的turtle库绘制图形
- Python最简单的图形编程
- Python基本语法熟悉,turtle图形函数画图
- 使用python中turtle库绘制图形
- Python3使用turtle绘制超立方体图形示例
- 简单的python程序--图形输出数字参数序列
- opencv3 for python 之 创建图片绘制简单几何图形
- opencv for python 之 创建图片绘制简单几何图形