NetLogo banner

Home
Download
Help
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:
Sample Models/Computer Science

(back to the library)

Wandering Letters

[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 model illustrates how to build a word processor where each of the letters acts independently. Each letter knows only which letter comes before it and how long its word is. When the letters or margins are moved, the letters find their own ways back to their proper locations.

HOW IT WORKS

Each letter looks both for changes in the margins and for being out of sync with its "leader", which is the letter before it in the text. If it is not in its proper place relative to its leader, it takes a step in its leader's direction.

HOW TO USE IT

SETUP initializes the margins and some sample sentences for the text.

GO starts and stops the simulation.

The LEFT-MARGIN and RIGHT-MARGIN sliders let you move the sliders. You can move these sliders while GO is running and the letters will adjust on the fly.

SCATTER LETTERS scatters the letters randomly about the View. You can press this even while GO is running.

LINE-SPACING controls how much space there is between lines.

THINGS TO NOTICE

How do the letters find their way home? In what ways is this different from the behavior of letters in a standard word processor?

THINGS TO TRY

While GO is pressed try:

  • Moving the margin sliders
  • Changing the spacing
  • Pushing the scatter button
  • Combinations of all three

EXTENDING THE MODEL

Can you extend the model so the user can type his/her own message? You might want to use the user-input primitive for this.

Sometimes a space will end up at the beginning of a new line. Try to fix it so that spaces are ignored at the ends of lines.

NETLOGO FEATURES

Note the use of a blank shape to make a turtle that is invisible except for its label.

CREDITS AND REFERENCES

This model is based on a Smalltalk program of the same name developed by Ted Kaehler of Disney Interactive.

HOW TO CITE

If you mention this model or the NetLogo software in a publication, we ask that you include the citations below.

For the model itself:

Please cite the NetLogo software as:

COPYRIGHT AND LICENSE

Copyright 1997 Uri Wilensky.

CC BY-NC-SA 3.0

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at uri@northwestern.edu.

This model was created as part of the project: CONNECTED MATHEMATICS: MAKING SENSE OF COMPLEX PHENOMENA THROUGH BUILDING OBJECT-BASED PARALLEL MODELS (OBPML). The project gratefully acknowledges the support of the National Science Foundation (Applications of Advanced Technologies Program) -- grant numbers RED #9552950 and REC #9632612.

This model was developed at the MIT Media Lab using CM StarLogo. See Wilensky, U. (1993). Thesis - Connected Mathematics: Building Concrete Relationships with Mathematical Knowledge. Adapted to StarLogoT, 1997, as part of the Connected Mathematics Project. Adapted to NetLogo, 2001, as part of the Participatory Simulations Project.

This model was converted to NetLogo as part of the projects: PARTICIPATORY SIMULATIONS: NETWORK-BASED DESIGN FOR SYSTEMS LEARNING IN CLASSROOMS and/or INTEGRATED SIMULATION AND MODELING ENVIRONMENT. The project gratefully acknowledges the support of the National Science Foundation (REPP & ROLE programs) -- grant numbers REC #9814682 and REC-0126227. Converted from StarLogoT to NetLogo, 2001.

(back to the NetLogo Models Library)