New Commands to version 2.0 (Printable)
acos
number
[Observer, Turtle]
Trigonometric function. Returns
the arccosine of the specified number. All angles returned are in degrees.
alive? [Observer,
Turtle]
Returns a boolean. If the
turtle is alive, it returns true. If the turtle is not alive it returns false.
alive?-of number
[Observer, Turtle]
Returns a boolean. If the
turtle with the given who number is alive, it returns true. If the turtle with
the given who number is not alive it returns false.
asin
number
[Observer, Turtle]
Trigonometric function. Returns
the arcsine of the specifiednumber
. All angles returned are in degrees.
average-of-list list
[Observer, Turtle]
Returns the numerical average of the given list.
average-of-patches [list of commands]
[Observer, Turtle]
Returns the numerical average of the [list of commands] when evaluated accross all the patches.
average-of-turtles [list of commands]
[Observer, Turtle]
Returns the numerical average of the [list of commands] when evaluated accross all the turtles.
cct,
create-custom-turtles breed number
[Observer]
Creates number
turtles of type breed.
NOTE: Most users will use create-foxes directly rather than using create-custom-turtles.
cct-and-do, create-custom-turtles-and-do breed number [list of commands]
[Observer]
Creates number
turtles of
type breed and tells them to do [list of
commands]
.
clearplots
[Observer, Turtle]
Resets the title of all of the graphs to "Plot Window".
Resets the axis labels to each span 0 to 1000. Clears
everything drawn by all plot pens, and resets all pens to (0, 0) and their original
colors.
insert index list element
[Observer, Turtle]
Returns a modified [list of data] with element
inserted into the index
position.
log number
base [Observer, Turtle]
Math function. Returns the log of
number according to specified base.
max-of-list list [Observer,
Turtle]
Returns the greatest value in the given list.
median-of-list list
[Observer, Turtle]
Returns the median of the given list.
median-of-patches [list of commands]
[Observer, Turtle]
Returns the median of the [list of commands] when [list of
commands] is evaluated by all patches.
median-of-turtles [list of commands]
[Observer, Turtle]
Returns the median [list of commands]
when [list of commands]is evaluated for all turtles
.
min-of-list list [Observer,
Turtle]
Returns the least value in the given list.
mode-of-list list
[Observer, Turtle]
Returns the mode of the given list.
mode-of-patches [list of commands]
[Observer, Turtle]
Returns the mode of the given [list of commands] when evaluated accross all the patches.
mode-of-turtles [list of commands]
[Observer, Turtle]
Returns the mode of the given [list of commands] when run over all the turtles.
mouse-down? [Observer,
Turtle]
Returns a boolean. If the
mouse button is clicked, it returns true. If the mouse buttons is not clicked,
it returns false.
one-of-turtles-with [condition] [list of commands]
[Observer,
Turtle]
Chooses a turtle based on the following [condition]
and runs the commands specified in [list of commands]
plotxy
x-value y-value
[Observer,
Turtle]
Plots a point at the location (x-value, y-value).
This procedure is used for X-Y plots and scatterplots.
print-status text or variables
[Observer, Turtle]
Prints the text or variables
to the status bar.
remove index list
[Observer, Turtle]
Removes the element in the index
position from the specified list
.
remove-element element list
[Observer, Turtle]
Removes the specified
element
from list
.
repeat number [list of commands]
[Observer,
Turtle]
Do [list of commands]
number
times.
reverse list
[Observer, Turtle]
Reverses the order of the elements in list.
save-next-version [Observer]
Saves the current project using the same name as the previous version except with a number at the end, incremented by one each time
a new version is saved.
sdev-of-list list
[Observer, Turtle]
Returns the standard deviation of the given list.
sdev-of-patches [list
of commands]
[Observer, Turtle]
Returns the standard deviation of the given [list of commands] when evaluated
accross all the patches.
sdev-of-turtles [list
of commands]
[Observer, Turtle]
Returns the standard deviation of the [list of commands] when evaluated accross all the turtles.
setshape
shape
-name [Turtle]
Turtles set their shape to shape-name
.
Note: shape-name can be the number of the shape as well.
variance-of-list list
[Observer, Turtle]
Returns the variance of the given list.
variance-of-patches [list of commands]
[Observer, Turtle]
Returns the variance [list of commands] amongst all the patches.
variance-of-turtles [list of commands]
[Observer, Turtle]
Returns the variance of [list of commands] amongst all the
turtles.
who-max-of-frogs [list of commands]
[Observer, Turtle]
Returns a list with the who number of the turtle of
breed frogs corresponding to the highest value of [list of commands] along with
the highest value of [list of commands].
who-max-of-frogs-with [condition] [list of commands]
[Observer,
Turtle]
Returns a list with the who number of the turtle of
breed frogs which satifies the [condition] and has
the highest value of [list of commands] along with the highest value of [list
of commands].
who-max-of-turtles [list of commands]
[Observer, Turtle]
Returns a list with the who number of the turtle corresponding
to the highest value of [list of commands] along with the highest value of [list
of commands].
who-max-of-turtles-with [condition] [list of commands]
[Observer,
Turtle]
Returns a list with the who number of the turtle which
satifies the [condition] and has the highest value
of [list of commands] along with the highest value of [list of commands].
who-min-of-frogs [list of commands]
[Observer, Turtle]
Returns a list with the who number of the turtle of
breed frogs corresponding to the smallest value of [list of commands] along
with the smallest value of [list of commands].
who-min-of-frogs-with [condition] [list of commands]
[Observer,
Turtle]
Returns a list with the who number of the turtle of
breed frogs which satifies the [condition] and has
the least value of [list of commands] along with the smallest value of [list
of commands].
who-min-of-turtles [list of commands]
[Observer, Turtle]
Returns a list with the who number of the turtle corresponding
to the smallest value of [list of commands] along with the smallest value of
[list of commands].
who-min-of-turtles-with [condition] [list of commands]
[Observer,
Turtle]
Returns a list with the who number of the turtlewhich satifies the [condition]
and has the least value of [list of commands] along with the smallest value
of [list of commands].