at-points-regions_2009


Information

Created with NetLogo version NetLogo 4.0.4
Running with NetLogoLite.jar version 404.



Procedures

NetLogo Version: NetLogo 4.0.4

turtles-own [ shadow ]

to startup
   setup
end
   
to setup
   ca
   
   crt 1
   [ set size 5
     set shadow n-values
     ( size * size ) ;; number of points
     [ ( list            ;; define coordinate offsets
          ( ( ? mod size ) - int ( size * .5 ) )   ;; x offset
          ( int ( ? / size ) - int ( size * .5 ) )    ;; y offset
        )
     ]
   ]
   ask n-of 100 patches [ set pcolor red ]
   
end

to go   ;; turtle procedure 
   ask turtles
   [
     rt 5 - random-float 10
     jump 1
     if pcolor = red
     [ ask patches at-points shadow [ set pcolor green ] ]
   ]
end    

                    


Download Link

View or download the complete model file (to download: right-click, save-link-as):
-- Download at-points-regions_2009 --