This reporter lets you give a turtle a "cone of vision" in front of itself. The cone is defined by the two inputs, the vision distance (radius) and the viewing angle. The viewing angle may range from 0 to 360 and is centered around the turtle's current heading. (If the angle is 360, then in-cone is equivalent to in-radius.)
in-cone reports an agentset that includes only those agents from the original agentset that fall in the cone. (This can include the agent itself.)
The distance to a patch is measured from the center of the patch.
ask turtles [ ask patches in-cone 3 60 [ set pcolor red ] ] ;; each turtle makes a red "splotch" of patches in a 60 degree ;; cone of radius 3 ahead of itself
Take me to the full NetLogo Dictionary