NetLogo banner

 Home
 Download
 Help
 Resources
 Extensions
 FAQ
 NetLogo Publications
 Contact Us
 Donate

 Models:
 Library
 Community
 Modeling Commons

 User Manuals:
 Web
 Printable
 Chinese
 Czech
 Farsi / Persian
 Japanese
 Spanish

  Donate

NetLogo Models Library:
Code Examples

(back to the library)

Mouse 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 demo shows how to use the mouse-down?, mouse-xcor, and mouse-ycor reporters to make a model that the user can interact with using the mouse. It also demonstrates the difference between using patches and turtles to achieve a desired effect.

NETLOGO FEATURES

If you look at this model's settings (by clicking the SETTINGS button in the main toolbar), you will notice that it uses a "Frame Rate" of 1000, which is much higher than the default value of 30. This ensures that drawing happens as fast as possible. See the NetLogo Programming Guide for more information on frame rate and view updates in general.

(back to the NetLogo Models Library)