Home Download Help Forum Resources Extensions FAQ NetLogo Publications Contact Us Donate Models: Library Community Modeling Commons Beginners Interactive NetLogo Dictionary (BIND) NetLogo Dictionary User Manuals: Web Printable Chinese Czech Farsi / Persian Japanese Spanish
|
NetLogo Models Library: |
If you download the NetLogo application, this model is included. You can also Try running it in NetLogo Web |
This code example shows how to use, and the differences between, the import-pcolors
, import-drawing
, and import-pcolors-rgb
primitives.
Agents cannot sense the drawing, so they cannot interact with or process images imported by import-drawing
. If you need an image agents can sense, you must use import-pcolors
or import-pcolors-rgb
.
Select the sample image you want to import with the FILENAME chooser, and then press either button below the chooser.
If you want to use your own image file, use the buttons that use user-choose-file
to let you pick a file.
The drawing appears in front of the patch colors.
Images imported by import-pcolors
and import-pcolors-rgb
are scaled to fit the world. The colors when using import-pcolors
may be distorted since NetLogo supports only a limited color set for pcolor
values. When using import-pcolors-rgb
the colors will be set to three-item RGB lists. See the Color section of the Programming Guide in the NetLogo User Manual for information on colors in NetLogo.
Try loading the different images into the patches to get an idea of the type of color distortion to expect.
Try importing an image with import-pcolors
and then import the same image with import-drawing
and import-pcolors-rgb
. How does handling of the image differ?
(back to the NetLogo Models Library)