Create n
new turtles
on specific patches
.
sprout(n, patches, breed, heading, color, turtles)
# S4 method for numeric,matrix
sprout(n, patches, breed, heading, color, turtles)
Integer. Vector of length 1 or of length the number of patches
.
Number of new turtles
to create on each patch
.
Matrix (ncol
= 2) with the first column pxcor
and the second
column pycor
representing the patches
coordinates.
Character. Vector of breed
names.
Must be of length 1 or of length the number of patches
.
If missing, breed
= turtle
for all the sprouted turtles
.
Numeric. Vector of values between 0 and 360.
Must be of length 1 or of length the number of patches
.
If missing, a random heading
is assigned to each sprouted turtle
.
Character. Vector of color
names.
Must be of length 1, of length the number of patches
or
of length sum(n)
.
If missing, colors
are assigned using the function rainbow(n)
.
AgentMatrix
object representing the moving agents
.
AgentMatrix
including the new
sprouted turtles
.
nrow(patches)
must be equal to 1 or to n
.
If `turtles` is provided, the new `turtles` are added to
the `turtles` when returned. The `who` numbers of the sprouted `turtles`
therefore follow the ones from the `turtles`.
All new sprouted `turtles` are placed at the end of the `agentMatrix` object.
If no `turtles`
is provided, a new `agentMatrix` is created and the `who` numbers
start at 0.
If `turtles` is provided and had additional variables created
with `turtlesOwn()`, `NA` is given for these variables
for the new sprouted `turtles`.
Wilensky, U. 1999. NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University. Evanston, IL.