|
Lab 4: Lighting up the Patches!
In Tutorial #3, you learn to command the turtles on your graphics window. The purpose of this tutorial is to further acquaint you with the graphics window and specifically, the coordinate system and characteristics of the patches. Patches are agents just as are turtles, but the patches do not move around in the graphics window.
The patches represent a two dimensional cellular automata. They are able to acquire information about their neighbors. The term neighbor is a patch primitive. Lets examine the idea of neighbors and neighbors4 more closely.
Open the Netlogo program and right click anywhere on the graphics window.
You see that you can edit, select or inspect the patch you clicked on. You are going to edit the graphics screen; so, left click on edit and another dialog box pops up that looks like the one here.
You will want to make the patches quite large but not have many of them. For both screen edge dimensions enter 1. The patch size will be 100. Then left click apply. What you have is a black screen and it is not apparent how many patches are on the screen. To make the patches easier to visualize, enter the following in the command center as the observer:
ask patch 0 0 [set pcolor green]
You should see in the graphics screen a green square appear in the center of the screen like this.
When you are dealing with the patches; the coordinate system used always begins with this patch in the center of the screen. Right click on the green square now. The window that pops up is the same as we saw when we were going to edit the screen. This time, left click on the “inspect patch 0 0”
Here we get some important information. What is the patch x coordinate? What is the patch y coordinate? What is the patch color?
Close the inspect patch box.
Continue this Lab
|