width() (no argument)
• Returns the value of the current line drawing width.
Specifying Direction and Forward/Back Movement
right()
Rotates the turtle to the right by a specified angle so its head is pointed in a desired orientation.
Syntax: right(a)
• a argument: Specifies in degrees the angle (0° ≤ a < 360°) which the turtle should be rotated.
- Type: int or float
left()
Rotates the turtle to the left by a specified angle so its head is pointed in a desired orientation.
Syntax: left(a)
• argument a is the same as that for right.
setheading()
Specifies the absolute orientation of the turtle's head, with east
being 0° (right), 90° north (top), 180° west (left), and 270° south
(bottom).
Syntax: setheading(a)
• a argument: Specifies the orientation of the head of the turtle in degrees (0° ≤ a < 360°).
- Type: int or float
forward()
Moves the turtle forward in the direction of the current turtle head orientation. The head orientation does not
change.
Syntax: forward(n)
• n argument: Specifies the distance of turtle movement.
- Type: int or float
backward()
Moves the turtle back, in the direction opposite that of the current turtle head orientation. The head orientation
does not change.
Syntax: backward(n)
• The argument n is the same as that for f orward.
Moving to Specified Coordinates
goto(,)
Moves the turtle to the specified coordinates. The head orientation does not change.
Syntax: goto( x , y )
• x , y arguments: Specify the coordinates ( x , y ) of the turtle's destination.
- x , y type: int or float
setposition(,)
Moves the turtle to the specified coordinates. The head orientation does not change.
132
90°
180°
0°
270°
Need help?
Do you have a question about the CLASSWIZ CG and is the answer not in the manual?
Questions and answers