NetLogo banner

Home
Download
Help
Resources
Extensions
FAQ
NetLogo Publications
Contact Us
Donate

Models:
Library
Community
Modeling Commons

Beginners Interactive NetLogo Dictionary

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

  Donate

NetLogo Models Library:
Code Examples

(back to the library)

Next Patch 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 code example demonstrates how to find out what patch a turtle would cross into next if it were to move forward continuously.

Note that NetLogo doesn't actually have continuous motion; turtles can only move by "jumping" a finite amount. So it's rare that you need the code in this code example; normally a turtle can just use the patch-ahead primitive to find out where it would land if it jumped a certain distance.

See the Code tab for further commentary.

RELATED MODELS

This code is used in the Rugby model, in Sample Models under Mathematics.

(back to the NetLogo Models Library)