Python:利用turtle库绘制iPhone4草图
来源:互联网 发布:台湾士林夜市 知乎 编辑:程序博客网 时间:2024/05/17 01:36
#苹果手机
##圆角矩形,参数:length(宽),high(高),cor_angle(弧度值)cor_rad(圆形轨迹半径的位置)def round_rectangle(length,high,cor_angle,cor_rad): for i in range(2): turtle.fd(high) turtle.circle(cor_rad,cor_angle) turtle.fd(length) turtle.circle(cor_rad,cor_angle) def main2(): turtle.setup(1300,800,0,0)#启动窗口的大小,左上角右上角坐标 pythonsize=2 turtle.pensize(pythonsize)#运行宽度 turtle.speed(10) turtle.seth(90)#启动时运行的方向(角度) #最外边框 turtle.pencolor("#8E8e8e") turtle.penup() turtle.goto(202,-202) turtle.pendown() round_rectangle(244,484,90,30) #填充 turtle.penup() turtle.goto(200,-200) turtle.pendown() turtle.begin_fill() turtle.color("#F0F0F0") round_rectangle(240,480,90,30) turtle.end_fill() #手机屏 turtle.pencolor("black")#(#3000440) turtle.penup() turtle.goto(185,-150) turtle.pendown() turtle.begin_fill() turtle.color("black") round_rectangle(270,380,90,0) turtle.end_fill() #听筒 turtle.penup() turtle.goto(80,265) turtle.pendown() turtle.begin_fill() turtle.color("#9d9d9d") round_rectangle(60,4,90,1) turtle.end_fill() #听筒上面的小黑 turtle.penup() turtle.goto(67,290) turtle.pendown() turtle.begin_fill() turtle.color("#3c3c3c") round_rectangle(36,4,90,1) turtle.end_fill() #摄像头 turtle.penup() turtle.goto(0,265) turtle.pendown() turtle.begin_fill() turtle.color("#3c3c3c") turtle.circle(6,360) turtle.end_fill() #home健 turtle.pencolor("#9d9d9d")#(#3000440) turtle.penup() turtle.goto(75,-185) turtle.pendown() turtle.circle(25,360) #home健图案 turtle.pencolor("#9d9d9d")#(#3000440) turtle.penup() turtle.goto(60,-190) turtle.pendown() draw(10,10,90,5) main2()
1 0
- Python:利用turtle库绘制iPhone4草图
- 利用python中的turtle库绘制图形
- 利用Python的turtle库绘制玫瑰
- 运用Python的turtle库绘制等边三角形
- Python turtle库绘制时钟笔记
- 用Python的Turtle库绘制森林
- python 用turtle库绘制时钟
- Python起步之利用Turtle进行时钟绘制
- turtle库绘制五角星
- turtle库绘制树
- Python 绘图—使用Turtle库绘制动态钟表
- 【Python基础】1.4.3 Turtle库绘制多边形实例
- Turtle 库绘制一棵西兰花
- 用Python的Turtle模块绘制五星红旗
- Python图形工具turtle绘制国际象棋棋盘
- Python标准库-turtle
- [python学习]Turtle库
- 【python】turtle库
- maven能帮我们做什么
- How to debug kernel with QEMU-KVM
- zookeeper原理(转)
- poj 3667 Hotel 区间合并
- 直接把View Controller的view addSubview到另一个View,则不会调用viewDidAppear viewWillAppear
- Python:利用turtle库绘制iPhone4草图
- pictureviewer学习记录
- 1061. Dating
- 搭建git服务器之二:gitosis
- 本地通知(设置铃声图标和启动图片)
- iOS使用xib自定义UIView
- javascript性能优化
- com.alibaba.fastjson.JSONObject.getString耗时问题
- 源代码解析Servlet生命周期 转自segmentfault