(The patch variable begins with “p” so it doesn’t get confused with the turtle variable, since turtles have direct access to patch variables.) If you set the variable, the turtle or patch changes color. For example, all turtles and links have a color variable, and all patches have a pcolor variable. Is there a color variable for a link in NetLogo? When NetLogo starts up, min-pxcor, max-pxcor, min-pycor and max-pycor are -16, 16, -16, and 16 respectively. The total number of patches is determined by the settings min-pxcor, max-pxcor, min-pycor and max-pycor. Just like in the standard mathematical coordinate plane, pxcor increases as you move to the right and pycor increases as you move up. ![]() How is the total number of patches in NetLogo determined? ![]() We call the patch’s coordinates pxcorand pycor. The patch in the center of the world has coordinates (0, 0). (Patches can’t move, but otherwise they’re just as “alive” as turtles and the observer are.) Patches have coordinates. When NetLogo starts up, there are no turtles yet. (The coordinates are absolute coordinates they are not computed relative to this agent, as with patch-at.) If x and y are integers, the point is the center of a patch. Given the x and y coordinates of a point, reports the patch containing that point. Which is the center of a patch in NetLogo? This means that pxcorand pycorboth range from -17 to 17, so there are 35 times 35, or 1225 patches total. When NetLogo starts up, both screen-edge-xand screen-edge-yare 17. The total number of patches is determined by the settings screen-edge-xand screen-edge-y. Which is an example of a NetLogo command?Įxamples: ask n-of 10 patches ask 10 random patches to sprout 1 turtule ask turtle 0 ask turtle 0 to “hatch” a new turtle create-turtles 10 creates 10 turtles create-wolverines creates 10 turtles of breed wolverine note that you can immediately assign turtle characteristics and issue commands: How many pxcorand pycorboth are there in NetLogo? ![]() The first input defines the name of the agentset associated with the breed. Breed This keyword, like the globals, turtles-own, and patches-own keywords, can only be used at the beginning of the Code tab, before any procedure definitions.
0 Comments
Leave a Reply. |