NetLogo version NetLogo 4.0.4
Running with NetLogoLite.jar version 404.
NetLogo Version: NetLogo 4.0.4
to startup doit end to doit ca no-display ask patches [ sprout 1 [ set label (pxcor + pycor * (max-pxcor + 1) ) set size 0 ] ] ; ask turtles with [ label mod 6 = 0 ] [ set pcolor blue ] ask turtles with [ label mod 2 = 0 ] [ die ] display let stop-number sqrt ( (max-pxcor + 1 )* (max-pycor + 1)) let n 3 while [n < stop-number ] [ if any? turtles with [ label = n ] [ ask turtles with [ label > n and label mod n = 0 ] [ die ] ;; display ] set n n + 1 ] display ask turtles [ ; set pcolor pink if any? turtles with [ label = [label] of myself - 2 or label = [label] of myself + 2 ] [ set label-color yellow ; set pcolor red ] ] display end
View or download the complete model file (to download: right-click, save-link-as):
-- Download sieve-of-eras_3 --