NetLogo banner

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

  Donate

NetLogo Models Library:
Code Examples

(back to the library)

Transparency Example

[screen shot]

If you download the NetLogo application, this model is included. You can also Try running it in NetLogo Web

WHAT IS IT?

This example demonstrates transparency in NetLogo.

HOW IT WORKS

Turtle, link, and label color values can contain lists of numbers which represent either RGB or RGBA colors, that is, red, green, and blue, or red, green, blue, and alpha. Alpha is used to represent how opaque or transparent a color is. Like red, green and blue values, range from 0 to 255 where 0 is completely transparent (invisible) and 255 is completely opaque (nothing behind it can be seen).

HOW TO USE IT

Press the SETUP button. Notice the clusters of turtles in the view.

Now press the SET-TRANSPARENCY button which will retain the current color of the turtles and add the transparency indicated in the slider. Take note of the clusters again.

Press:

 inspect one-of turtles

to see a close up view of a smaller portion of the world.

THINGS TO NOTICE

At present transparency works only in the 2D view, not the 3D view.

(back to the NetLogo Models Library)