We've now talked about the commands that create the turtles...
looked at how they move around, at what their different colors are...
Now we going to talk about what do you do with this.
I have all these turtles now. Let's say I want to go back and start over again,
I want to create a new set of turtles and make them move around.
Then there's a command 'clear-all', or 'ca' as it's also represented,
which essentially destroys all the current state of the model.
It won't destroy the info or the code or interface tab elements that you've designed
but it will destroy the turtles and the agents and the properties thereof.
So what that lets you do is then start with a brand new model.
So now I can go back, and I can create the turtles again,
and if you don't want to type 'create- turtles' you can type 'crt' instead,
so I create another 100 turtles,
and I can ask those turtles to set their color to blue, and their size to 2,
so that I get some sort of idea of where they are and what their color is,
and now I can have them move around again.
Now, before we were just assuming we knew where they went...
or we used the speed slider to slow down and see where they went.
Another way we can do this is we can ask the turtles to turn their pen on,
so they have a command 'pen-down', which puts a pen below each of the turtles...
and draws on the screen where they move.
So once I've done that, now I can ask the turtles to do that command...
that draws a square again, '[ repeat 4 [ rt 90 fd 10 ] ]'
and what I'll see is each of the turtles drawing that pattern on the screen.
Now, let's say I like the turtles where they are, but I don't like the pattern...
then I can use the command 'clear-drawing', which will just remove the pattern...
while leaving the turtles where they are.
Finally, we've shown that we can destroy all the turtles by using 'clear-all',
but 'clear-all' will also destroy anything else that's left.
If I want to leave the drawing and remove the turtles,
then I could have them draw the pattern again -
I did that, by the way, by hitting the up- arrow key to retrieve a previous command -
and then I can ask all the turtles to die.
What this does is remove the turtles but leaves the rest of the state of the world intact.
In NetLogo, you always are polite, you're always asking turtles to do things...
even when you're asking them to die!
But the turtles are very polite so they kindly respond to your request...
and they remove themselves from the world.