2014-11-21 HW

posted Nov 21, 2014, 5:38 AM by Samuel Konstantinovich   [ updated Nov 24, 2015, 5:04 AM ]
1.You are responsible for watching Tutorials: 8, 9, 10. You may have a quiz on these videos. 
2. You must finish your Lab.

-Put your n-gon procedure in a new netlogo file.
-make a button called make ngon to make all turtles draw an n-gon.
-make a slider for number of sides called sides.
-make a slider for the length of each side called side-length.

On paper: What should the min/max values of each slider be? Decide what they should be and justify your choices.

Test if your netlogo model works so far.

-make a slider for number of turtles called num-turtles. (min/max value?)
-make a button called setup that
   1. Resets the world.
   2. Spawns num-turtles turtles based on a slider. The x and y positions should be set randomly based on your world size. See: random and max-pxcor in dictionary, and random-pxcor.

-make a turtle context wiggle function:
    wiggle speed  : make the turtle turn randomly and move forward speed units. 

-make a speed slider (speed should be really small numbers, 5 is super fast.)
  If you wiggle 1    turn randomly and move forward 1  (fast speed)
  If you wiggle .1   turn randomly and move forward .1 (moderate speed)

How much turning should the turtles do to make a "wiggle" like motion?

Make a button called go that will have all turtles wiggle. Test the "forever" checkbox. What does it do?