11-25-2013 NetLogo Lab

posted Nov 25, 2013, 5:35 AM by Samuel Konstantinovich   [ updated Nov 25, 2013, 6:10 AM ]
Pair up with your neighbor and make a model as follows:

-Spawn a number of turtles between 1 and 100 based on a slider. The x and y positions should be set randomly based on your world size. See: max-pxcor in dictionary, and random-pxcor.
-Turtles regular speed that is determined by a slider from 0.1 to 1.0
-Turtles have a regular max turn angle from 1 to 180 degrees based on a slider
-Turtles move in a wiggle like manner using the speed and angle sliders. You can make the turn equal probability or biased,  but you must state which you used in a 
-The world has 4 quadrants like in math, and in each quadrant the turtles behave differently as follows

Quadrant 1 turtles move forward without turning at normal speed. They grow by 0.1 size per frame every frame up to a maximum size of 5. They change color to red.

Quadrant 2 turtles move double speed. They turn at a normal rate. Their color increases by 0.1 every frame. Their size decreases by 0.2 every frame but cannot shrink below size 1.

Quadrant 3 turtles move at half speed and turn at double speed. Their size decreases by 0.1 every frame but cannot shrink below size 1.

Quadrant 4 turtles move and turn normally. They set colors to random multiples of 10 + 5 like 15 25 35 etc.range is 5 to 135.Their size decreases by 0.1 every frame but cannot shrink below size 1.


You should break your code  into functions. I do not want to see a really long set of if statements with tons of code in it in the go command.
Comments