NetLogo version NetLogo 3.0.2
Running with NetLogoLite.jar version 302.
NetLogo Version: NetLogo 3.0.2
;;;; SUMMARY ;; The mouse makes the bubbles swell ;; COPYRIGHT ;;;; Copyright (C) 2006 James P. Steiner ;;;; Some Rights Reserved. ;;;; Licensed under Creative Commons Attribution-Non-Commercial-Share-Alike licens 2.0. ;;;; globals [ mx my ] to startup setup end to setup ca cct 1000 [ setxy random 100 random 100 set shape "circle" ] end to go every ( 1 / 30 ) [ ifelse mouse-inside? [ set mx mouse-xcor set my mouse-ycor ] [ set mx 0 set my 0 ] ask turtles [ rt -10 + random-float 20 jump .1 let dist distancexy-nowrap mx my let alter (dist ) / (screen-edge-x * .75) if alter > .5 [ set alter .5 ] let mag (cos (180 * alter)) set mag mag * mag * mag set size 1 + 5 * mag ] ] end
View or download the complete model file (to download: right-click, save-link-as):
-- Download mouse-bubbles --