python's turtle

turtle.setup(width,height,startx,starty)
-setup sets the width, height and starting position of the window (relative to the coordinates of the upper left corner of the screen)

turtle space coordinate system
    1. Absolute coordinates:
        The initial position of the turtle is (0, 0), which is in the center of the canvas.
        turtle facing right
        Travel function turtle.goto (x, y) anywhere to reach (x, y)
    2 Turtle coordinates:
        No matter where the turtle is, the direction it faces is the forward direction, as well as the left direction and the right direction.
        Forward function: turtle.fd()
        Back function: turtle.bk()
        Steering function: turtle.circle (r.angle) takes the r pixel on the left as the center of the circle, and rotates the angle of the angle
Angular Coordinate System
    Steering function turtle.seth(angle) towards absolute direction angle
turtle.penup() brush up
turtle.pendown() brush down
turtle.pensize() turtle waist
turtle.pencolor() brush color


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324898381&siteId=291194637