Python turtle库的画笔控制

turtle.penup()   别名 turtle.pu() :抬起画笔海龟在飞行

turtle.pendown()  别名   turtle.pd():画笔落下,海龟在爬行

turtle.pensize(width)   别名  turtle.width(width)  :设置画笔的宽度,海龟的腰围

turtle.pencolor(color)  color为颜色字符串或r,g,b值  :

      颜色字符串:turtle.pencolor("red")   

      RGB的小数值:turtle.pencolor(0.63,0.13,0.94)

      RGB的元组值:turtle.pencolor((0.63,0.13,0.94))

运动控制函数

turtle.forward(d)   别名: turtle.fd(d)

向前直行,海龟走直线    d:行进距离可以为负数

turtle.circle(r,extent=None)

根据半径 r  绘制 extent角度的弧形

r:默认圆心在海龟左侧r距离的位置

extent:绘制角度,默认是360度整圆

turtle.seth(angle)

控制海龟的的方向