NetLogo version NetLogo 4.1beta1
Running with NetLogoLite.jar version 411.
NetLogo Version: NetLogo 4.1beta1
globals [ dir ] patches-own [ ncolor rrggbb rr gg bb] to setup ask-in-order patches with [ do-set-pcolor (random 140) ] set dir [ 0 1 ] end to test if random 1000 < 20 [ set dir one-of [ [ 0 1 ] [ 1 0 ] [ -1 0 ] [ 0 -1 ] ] ] ask-in-order patches with [ do-scroll-color ] ask-in-order patches with [ do-set-pcolor ncolor ] every morph-speed [ ask-in-order patches with [ do-morph-color ] ] tick end to ask-in-order [ ## ] end to-report do-set-pcolor [ hue ] set pcolor hue report false end to-report do-scroll-color set ncolor [pcolor] of patch-at first dir last dir report false end to-report do-morph-color set pcolor ( 10 * floor (pcolor / 10)) + min (list 9.9 ((pcolor + 1) mod 10)) report false end
View or download the complete model file (to download: right-click, save-link-as):
-- Download scroll-and-morph_2009 --