Pencil Code Reference > fd


fd moves the turtle forward

fd moves the turtle forward. It is the opposite counterpart to bk.

The distance is measured in pixels.

fd 100

If a pen is selected, the turtle will draw a line as it moves.

pen red

fd 200

If the turtle is turned, it will move in the direction it points.

rt 45

fd 75

Turtle Distances

fd 100 moves about an inch on a typical screen, because most computers fit about 100 pixels in an inch. The graph paper background is equivalent to a 1/4 inch grid: it has one square per 25 pixels.