Due: Monday 12/15 10:00am
Submission name: work27.nlogox
Write a NetLogo program with the following Features:
Example: http://homer.stuy.edu/~dw/netlogo/work31_obf.html
- Interface
- A slider called
numColors: [1, 14] - A slider called
angle: [0, 360] - Include buttons for each procedure listed below, pass the appropriate slider value when required.
- A slider called
- Procedures
setup: observer- Clear the screen and create 1 turtle, the turtle should have its pen down
randomColors [r]: patch- Have every patch set its color to a random color.
- The number of colors should be based on the
numColorsslider. - The possible colors should be the “true” NetLogo colors (i.e. 5, 15, 25, …).
wiggle0 [theta]: turtlewait 0.1- Makes a turtle move forward 1 unit
- Makes a turtle turn right a random number of degrees in the range [0, theta).
wiggle1 [theta]: turtlewait 0.1- Makes a turtle move forward 1 unit
- Makes a turtle turn right a random number of degrees in the range [0, theta/2).
- Makes a turtle turn left a random number of degrees in the range [0, theta/2).
wiggle2 [theta]: turtlewait 0.1- Makes a turtle move forward 1 unit
- Makes a turtle turn right a random number of degrees in the range [-theta/2, theta/2).