Turtles


Building Turtles

(turtle-new image)
MediaScheme Turtle Constructor. Build a new turtle that draws on image.
(turtle-clone turtle)
MediaScheme Turtle Constructor. Make a clone of turtle (same position, direction, color, brush, etc.).

Moving Turtles

(turtle-forward! turtle distance)
MediaScheme Turtle Procedure. Moves turtle forward by the specified distance.
(turtle-teleport! turtle col row)
MediaScheme Turtle Procedure. Move turtle to (col,row). Do not draw along the way.
(turtle-face! turtle angle)
MediaScheme Turtle Procedure. Make turtle face the diretion specified by angle (clockwise from right).
(turtle-turn! turtle angle)
MediaScheme Turtle Procedure. Rotate turtle clockwise by angle degrees.

Drawing with Turtles

(turtle-down! turtle)
MediaScheme Turtle Procedure. Put turtle's brush down. When the turtle moves forward, it draws with the brush.
(turtle-up! turtle)
MediaScheme Turtle Procedure. Lifts turtle's brush. When turtle moves forward, it will not draw.
(turtle-set-brush! turtle brush)
MediaScheme Turtle Procedure. Set the brush that turtle draws with.
(turtle-set-color! turtle color)
MediaScheme Turtle Procedure. Set the color in which turtle draws.

Miscellaneous Turtle Procedures

(turtle-world turtle)
MediaScheme Turtle Procedure. Determine the world on which turtle resides.

Jerod Weinman