NetLogo Models Library:
## WHAT IS IT?
Random Balls simulates a frictionless billiard table.
## HOW IT WORKS
The balls are drawn in green. They move in straight lines and bounce off the walls but not off of each other. The center of mass is drawn in white and leaves a red trail.
## HOW TO USE IT
Select the number of balls to be used, then push SETUP. Push GO to run the model.
## THINGS TO NOTICE
Watch how the center of mass moves for a while. Is there a pattern? Is there a region in the box that it stays within?
## THINGS TO TRY
Use the speed slider to watch the model in slow motion. Also try fast forwarding it.
Run the model with a lot of turtles. What happens to the motion of the center of mass? Why? Now run it with only a handful of turtles. (Try it in slow motion.) Now what happens and why?
Let the model run for a while. What do you notice about how much time the center of mass spends at different distances from the origin (its frequency distribution)?
Push SETUP, then in the command center, enter:
ask balls [ set heading 60 ]
This points all of the turtles in the same direction. What does the center of mass do now? Try other headings.
## EXTENDING THE MODEL
Presently the balls don't bounce off each other. If they did, would it make a difference in the behavior of the center of mass? Try it.
## 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:
* Wilensky, U. (1998). NetLogo Random Balls model. http://ccl.northwestern.edu/netlogo/models/RandomBalls. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.
Please cite the NetLogo software as:
* Wilensky, U. (1999). NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.
## COPYRIGHT AND LICENSE
Copyright 1998 Uri Wilensky.
![CC BY-NC-SA 3.0](http://ccl.northwestern.edu/images/creativecommons/byncsa.png)
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 firstname.lastname@example.org.
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 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.