Home Download Help Forum Resources Extensions FAQ NetLogo Publications Contact Us Donate Models: Library Community Modeling Commons Beginners Interactive NetLogo Dictionary (BIND) NetLogo Dictionary User Manuals: Web Printable Chinese Czech Farsi / Persian Japanese Spanish

NetLogo Models Library: 
If you download the NetLogo application, this model is included. You can also Try running it in NetLogo Web 
The turtle goes forward "distanceoftravel" and returns to (startx, starty). The green patch is the center patch upon which there is a turtle at (startx, starty), and the patch "distanceoftravel" away from that center will flash as the turtle passes through it.
This is an illustration of the difference between a radius of 1 and the distance from patch to patch. Distance in NetLogo is measured in patches, and so "forward 1" for a turtle means for it to go forward exactly the length of one side of a patch. However, as illustrated by the pythagorean theorem, the distance across the diagonal of a patch is root 2 (around 1.414). As such, there are points and headings of a turtle within a patch from which going forward 1 will not result in changing the patch on which the turtle lands.
There is a searcher turtle that travels clockwise at distanceoftravel from the center (startx,starty). The searcher returns to the center each tick and goes forward distanceoftravel. distanceoftravel, startx, and starty are all sliders. The center turtle simply marks the center at (startx, starty).
Press setup, then press go. You can change the sliders while the model is running.
Patches are laid out in NetLogo such that they span from pxcor  0.5 on the left to an open boundary at pxcor + 0.5. The same equation is used for pycor. That is, for patch 3 1, it's actual real range is ([3.5,2.5), [1.5,0.5)). This is illustrated in the model.
Try changing startx to 0.5 and starty to 0.5. Where is the green patch now? Now try changing startx to 0.5 and starty to 0.5. When the startx = 0.5 and starty = 0.5, the turtle is centered on patch 0 0. When the startx = 0.5 and starty = 0.5, the turtle is centered on patch 1 1.
You could change the model such that there are a "halo" of turtles always distanceoftravel from the center.
(back to the NetLogo Models Library)