一、海龟画图是python的一个画图库、
写一个写轮眼
二、使用步骤
1.引入库
代码如下(示例):
import turtle as t
2.读入数据
代码如下(示例):
t.pensize(5)
t.penup()
t.goto(-100,-100)
t.pendown()
t.speed(100)
t.fillcolor('red')
t.begin_fill()
t.circle(200,360,100)
t.end_fill()
t.pencolor('red')
t.fillcolor('black')
t.begin_fill()
t.left(60)
t.circle(400,60) # 100是半径,60是弧度,比如90就是四分之一圆。
t.left(180-60)
t.circle(400,60)
t.right(30)
t.penup()
t.goto(-270,200)
t.pendown()
t.right(30)
t.left(60)
t.circle(400,60) # 100是半径,60是弧度,比如90就是四分之一圆。
t.left(180-60)
t.circle(400,60)
t.penup()
t.goto(70,200)
t.pendown()
t.right(60)
t.left(60)
t.circle(400,60) # 100是半径,60是弧度,比如90就是四分之一圆。
t.left(180-60)
t.circle(400,60)
t.end_fill()
t.done()
效果:
总结
提示:这里对文章进行总结:
海龟画图有无限可能希望大家一起做点有趣的东西。