Logo - Controlling the Turtle & Pen



Logo has a number of other drawing commands, some of which are given below.

  • pu − penup

  • pd − pendown

  • ht − hideturtle

  • dt − showturtle

  • setpensize

The pendown and penup commands tell the turtle to leave ink on the screen as it moves or not to leave ink, respectively. The hideturtle and showturtle commands hide or show the turtle, but do not affect its ability to leave ink as it moves. The home command causes the turtle to return to the center of the screen. It may leave ink behind, when the turtle returns to the center of the screen. The setpensize command decides the drawing pen size.

  • penup or pu means pick pen up, so you can move turtle without leaving tracks.

  • pendown or pd means pick pen down, so you can move the turtle and leave tracks.
  • hideturtle or ht means hide the turtle, so you can admire your drawing.

  • showturtle or st means show the turtle, so you can continue your drawing.

  • setpensize means it can make the pen larger, easier to see. Default pen size is –[1 1].

Following are few practice commands with the desired results on the right.

Practice Command 1

Practice Command 2

Practice Command 3
Advertisements