These pages are auto-generated from self-documenting comments embedded in class files.
For more information on breve and steve, refer to the breve homepage.

Drawing : TurtleDrawing

This class is included as part of the file TurtleDrawing.tz.
To use this class in a simulation, include the line "@use TurtleDrawing."

Class description:

The TurtleDrawing class is a subclass of Drawing which allows drawing via a series of "logo turtle"-like commands. Drawing is accomplished by giving commands to a turtle moving around in 3D space. All commands are interpreted from the turtle's perspective, taking into account its current position and orientation.

Unlike other angles used by breve, this class refers to angles as degrees and not radians to more closely match the behavior of traditional Logo implementations.

Class methods:

Manipulating the Turtle Avatar

Moving the Turtle


back by length (double)

Moves the turtle back by length.


forward by length (double)

Moves the turtle forward by length.


get-turtle

Returns the turtle agent object (an instance of Mobile).


hide-turtle

Hides the agent representing the turtle's current position and location. The turtle can be shown again using the method show-turtle.


pen-down

Puts the pen down so that lines are drawn as the turtle moves. This is done by setting transparency to 1.0.


pen-up

Lifts the pen so that no lines are drawn as the turtle moves. This is done by setting transparency to 0.0.


pop-state

"Pops" a state from the state stack and makes it current. This method reenables the most recently "pushed" state (done with push-state).


push-state

"Pushes" the current direction, color and point onto a stack so that it can be retrieved later using pop-state.


set-color to color (vector) with-transparency trans = 1.0 (double)

Sets the current pen color to color, with optional transparency value trans.


show-turtle

Shows the agent representing the turtle's current position and location. The turtle is visible by default, but can be hidden using hide-turtle.


turn-down by angle (double)

Rotates the Turtle left by angle degrees.


turn-left by angle (double)

Rotates the Turtle left by angle degrees.


turn-right by angle (double)

Rotates the Turtle right by angle degrees.


turn-up by angle (double)

Rotates the Turtle right by angle degrees.


Documentation created Sun Oct 7 19:13:03 2007