1 2 3 4
Logical to determine if the
The number of agents/locations in
agents2 must be equal to 1 or
to the length of
torus = FALSE,
world does not need to be provided.
torus = TRUE and the distance from one
its corresponding agent/location
agents2 is smaller around the
sides of the
world than across it, then the direction to the agent/location
agents2 going around the sides of the
world is given to the
If a turtle is facing its own location, its heading does not change.
AgentMatrix representing the
turtles with updated
Wilensky, U. 1999. NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University. Evanston, IL.
1 2 3 4 5 6 7 8 9
w1 <- createWorld(minPxcor = 0, maxPxcor = 4, minPycor = 0, maxPycor = 4, data = runif(25)) t1 <- createTurtles(n = 10, coords = randomXYcor(w1, n = 10)) plot(w1) points(t1, col = of(agents = t1, var = "color"), pch = 16) t1 <- face(turtles = t1, agents2 = cbind(x = 0, y = 0)) t1 <- fd(turtles = t1, dist = 0.5) points(t1, col = of(agents = t1, var = "color"), pch = 16)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.