- reset()
Delete the turtle’s drawings from the screen, re-center the turtle and set variables to the default values.
删除屏幕上目前的图像,将画笔置于中间,并将各变量重置默认值。 - clear()
Delete the turtle’s drawings from the screen. Do not move turtle. State and position of the turtle as well as drawings of other turtles are not affected.
删除屏幕上目前的图像,不移动画笔。画笔和其他画笔的状态和位置不受影响。 - mode(mode=None)
设置乌龟模式(“standard”,“logo”或“world”)并执行重置。如果没有给出模式,则返回当前模式。
standard:向右(东),逆时针
logo:向上(北),顺时针
world:使用用户自定义的方式 - home()
Move turtle to the origin – coordinates (0,0) – and set its heading to its start-orientation (which depends on the mode, see mode()).
移动画笔到圆点-坐标(0,0)-并且设置它的头部朝向为它的初始朝向(依赖于mode()方法) - begin_poly()
Start recording the vertices of a polygon. Current turtle position is first vertex of polygon.
开始记录多边形的顶点。当前画笔位置是多边形第一顶点。 - end_poly()
Stop recording the vertices of a polygon. Current turtle position is last vertex of polygon. This will be connected with the first vertex.
停止记录多边形顶点。当前画笔位置是多边形最后一个顶点,并将与第一个顶点连接。 - get_poly()
Return the last recorded polygon.
返回上一个记录的多边形。
python turtle库常用方法
最新推荐文章于 2024-07-25 18:54:11 发布