Create and assign turtles.
These commands handle the number of turtles, how they are created, and how to talk to them.
A list of all turtles.
ALLTURTLES outputs a list of the names of every turtle that currently defined in Logo.
ALLTURTLES is equivalent to the command
Arranges turtles in a circle.
CTURTLES activates and makes visible the number of turtles specified by its input
and arranges them in a circle in the center of the Graphics window. See also
Arranges turtles in a row.
LTURTLES activates and makes visible the number of turtles specified by its input and
arranges them in a horizontal line along the center of the Graphics window. See also
Creates a range of turtles.
SETTURTLES number SETT number
SETTURTLES defines the total number of turtles available. Their numbers range from 0 to the input of SETTURTLES minus 1. For example, SETTURTLES 16 will create the turtles [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15]. By default, Logo starts with 16 turtles defined and turtle 0 activated.
SETTURTLES creates turtles with the following characteristics:
|Position||Home [0 0]|
|Font:||Default system font, 9 points|
SETTURTLES accepts any number as input. The actual maximum of turtles depends
on the speed of the computer.
Therefore, SETTURTLES sets the maximum number of turtles that you can define to 99, although you could use the
DECLARE command to create more.
Sets the name of a turtle.
SETTURTLENAME :turtle :name
TURTLE name sets the name of the turtle whose object name is supplied as its first
input. It also sets the turtle's
To get the turtle name, see
Attaches a turtle to a Graphics window.
SETTWINDOW attaches all active turtles, controls, and bitmaps to a window. Its input is the name of the window in which those objects should appear. Using an empty list as the window name detaches all active objects from their windows, making them invisible.
TWINDOW command to retrieve the name of the window of the
first active turtle, control, or bitmap.
Gets the name of the first active turtle.
TURTLENAME outputs the name of the first active turtle. This is also the value of its NAME property.
To set the turtle name, see
Outputs a list of all turtle names.
TURTLENAMES Result: [TURTLE.10 TURTLE.11 TURTLE.12 TURTLE.13 TURTLE.14 TURTLE.15 TURTLE.0 TURTLE.1 TURTLE.2 TURTLE.3 TURTLE.4 TURTLE.5 TURTLE.6 TURTLE.7 TURTLE.8 TURTLE.9]
Reports the number of turtles.
Outputs the name of the window of the first active turtle.
TWINDOW outputs the name of the window to which the first active turtle, control, or bitmap is
attached. If the turtle is not attached to any window, its output is the empty list. This
command is equivalent to the command
SETTWINDOW command to attach a turtle, a control, or a bitmap to a
TWINDOW Result: GRAPHICS