dx | R Documentation |
Report the amount by which the turtles
' coordinates xcor
would change
if the turtles
were
to move forward the given distances with their current headings
.
dx(turtles, dist = 1)
## S4 method for signature 'agentMatrix,numeric'
dx(turtles, dist = 1)
## S4 method for signature 'agentMatrix,missing'
dx(turtles)
turtles |
|
dist |
Numeric. Vector of distances the |
Report the sine of the turtles
' heading
multiplied by the dist
values. Heading 0 is north and angles are calculated in degrees in a
clockwise manner.
Numeric. Vector of length turtles
.
Sarah Bauduin
Wilensky, U. 1999. NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University. Evanston, IL.
https://ccl.northwestern.edu/netlogo/docs/dictionary.html#dxy
w1 <- createWorld(minPxcor = 0, maxPxcor = 4, minPycor = 0, maxPycor = 4)
t1 <- createOTurtles(world = w1, n = 10)
dx(turtles = t1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.