Drawing with the turtle
Curious about where turtle drawing came from? Read SuperLogo and the turtle: learning by drawing.
The turtle starts at the scene center, facing upward, with its pen down.
forward(distance)moves by a signed distance and draws when the pen is down.right(degrees)turns clockwise for a positive amount.left(degrees)turns counter-clockwise for a positive amount.penUp()prevents movement from drawing.penDown()enables movement drawing.clear()removes turtle paths without moving the turtle.home()moves to the center, restores the upward heading, and draws that move when the pen is down.
# language: en
clear()
home()
for point in [1, 2, 3, 4, 5]:
forward 120
right 144
penUp()
forward 145
penDown()
say "The turtle drew a five-pointed star."
Turtle state and drawing can persist across explicit IDE runs until clear()
or Reset Scene is used. Reset Scene also restores the initial turtle position,
heading, and pen state.
Portable compositing between turtle paths and the immediate scene functions is not specified yet; native hosts may switch rendering modes and clear state. Keep turtle-only and scene-only drawing flows separate when the same program must behave identically across hosts.