turtle.shearfactor()

turtle.shearfactor(shear=None) Parameters: shear – number (optional) Set or return the current shearfactor. Shear the turtleshape according to the given shearfactor shear, which is the tangent of the shear angle. Do not change the turtle’s heading (direction of movement). If shear is not given: return the current shearfactor, i. e. the tangent of the shear angle, by which lines parallel to the heading of the turtle are sheared. >>> turtle.shape("circle") >>> turtle.shape

turtle.shapetransform()

turtle.shapetransform(t11=None, t12=None, t21=None, t22=None) Parameters: t11 – a number (optional) t12 – a number (optional) t21 – a number (optional) t12 – a number (optional) Set or return the current transformation matrix of the turtle shape. If none of the matrix elements are given, return the transformation matrix as a tuple of 4 elements. Otherwise set the given elements and transform the turtleshape according to the matrix consisting of first row t11, t12 and second row t21,

turtle.Shape.addcomponent()

addcomponent(poly, fill, outline=None) Parameters: poly – a polygon, i.e. a tuple of pairs of numbers fill – a color the poly will be filled with outline – a color for the poly’s outline (if given) Example: >>> poly = ((0,0),(10,-5),(0,10),(-10,-5)) >>> s = Shape("compound") >>> s.addcomponent(poly, "red", "blue") >>> # ... add more components and then use register_shape() See Compound shapes.

turtle.shapesize()

turtle.shapesize(stretch_wid=None, stretch_len=None, outline=None) turtle.turtlesize(stretch_wid=None, stretch_len=None, outline=None) Parameters: stretch_wid – positive number stretch_len – positive number outline – positive number Return or set the pen’s attributes x/y-stretchfactors and/or outline. Set resizemode to “user”. If and only if resizemode is set to “user”, the turtle will be displayed stretched according to its stretchfactors: stretch_wid is stretchfactor perpendicular to

turtle.shape()

turtle.shape(name=None) Parameters: name – a string which is a valid shapename Set turtle shape to shape with given name or, if name is not given, return name of current shape. Shape with name must exist in the TurtleScreen’s shape dictionary. Initially there are the following polygon shapes: “arrow”, “turtle”, “circle”, “square”, “triangle”, “classic”. To learn about how to deal with shapes see Screen method register_shape(). >>> turtle.shape() 'classic' >>> turtle.shap

turtle.setundobuffer()

turtle.setundobuffer(size) Parameters: size – an integer or None Set or disable undobuffer. If size is an integer an empty undobuffer of given size is installed. size gives the maximum number of turtle actions that can be undone by the undo() method/function. If size is None, the undobuffer is disabled. >>> turtle.setundobuffer(42)

turtle.sety()

turtle.sety(y) Parameters: y – a number (integer or float) Set the turtle’s second coordinate to y, leave first coordinate unchanged. >>> turtle.position() (0.00,40.00) >>> turtle.sety(-10) >>> turtle.position() (0.00,-10.00)

turtle.setx()

turtle.setx(x) Parameters: x – a number (integer or float) Set the turtle’s first coordinate to x, leave second coordinate unchanged. >>> turtle.position() (0.00,240.00) >>> turtle.setx(10) >>> turtle.position() (10.00,240.00)

turtle.setworldcoordinates()

turtle.setworldcoordinates(llx, lly, urx, ury) Parameters: llx – a number, x-coordinate of lower left corner of canvas lly – a number, y-coordinate of lower left corner of canvas urx – a number, x-coordinate of upper right corner of canvas ury – a number, y-coordinate of upper right corner of canvas Set up user-defined coordinate system and switch to mode “world” if necessary. This performs a screen.reset(). If mode “world” is already active, all drawings are redrawn according to the

turtle.setup()

turtle.setup(width=_CFG["width"], height=_CFG["height"], startx=_CFG["leftright"], starty=_CFG["topbottom"]) Set the size and position of the main window. Default values of arguments are stored in the configuration dictionary and can be changed via a turtle.cfg file. Parameters: width – if an integer, a size in pixels, if a float, a fraction of the screen; default is 50% of screen height – if an integer, the height in pixels, if a float, a fraction of the screen; default is 75% of screen