NetLogo banner

 Home
 Download
 Help
 Resources
 Extensions
 FAQ
 References
 Contact Us
 Donate

 Models:
 Library
 Community
 Modeling Commons

 User Manuals:
 Web
 Printable
 Chinese
 Czech
 Japanese

  Donate

NetLogo User Community Models

(back to the NetLogo User Community Models)

accurate_clock

by Erik Johnston (Submitted: 08/27/2004)

[screen shot]

Download accurate_clock
If clicking does not initiate a download, try right clicking or control clicking and choosing "Save" or "Download".

(You can also run this model in your browser, but we don't recommend it; details here.)

WHAT IS IT?

This is a simple netlogo model to simulate a clock.

HOW IT WORKS

Rotates “hand” shapes around the origin according using the timer primitive.

HOW TO USE IT

Set the time and then start the clock when the current time is euqal to the time set.

THINGS TO NOTICE

This model relies heavily on the use of the mod function operated on the inherent “who” identifier of the turtles and the way they are created. Each minute (0-59) is associated with a turtle with the same “who” identifier.

No turtle changes their ‘x’ or ‘y’ coordinate, the turtles with a hand shape simply change heading.

The turtle also uses the timer feature instead of the who feature to be more accurate in timing.

THINGS TO TRY

Try and tie the time to the actual time using: get-date-and-time

EXTENDING THE MODEL

Find new ways to represent the passage of time that is appealing to users or more informative.

Create a stopwatch

Find a way to user seconds that does not require a constant while loop checking mechanism. This might slow down other functions on your computer.

NETLOGO FEATURES

Uses turtles for all parts of the clock, both hands and minutes. Uses the timer command as a timing mechanism.

Uses the shapes editor to make the hands of the clock

CREDITS AND REFERENCES

Thank you to the Netlogo summer workshop at Northwestern – particularly Seth Tisue and Josh Unterman.

Model constructed by Erik Johnston
comments welcome at: erikwj@umich.edu

School of Information
Center for the Study of Complex Systems
University of Michigan

(back to the NetLogo User Community Models)