Farsi / Persian
NetLogo User Community Models
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.
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
School of Information
(back to the NetLogo User Community Models)