Tutorial 5: Hooke's Law

By Sean Luke
[Tutorial 5 documentation]

A demonstration of Hooke's Law. Balls of random location and mass are connected arbitrarily with rubber bands of random strength and minimum lax distance. You can change the number of balls and bands.

Because the system is initially at zero velociy, it stays in equilibribium. But if a fast-moving ball were to suddenly increase in mass, the system would be thrown out of equilibrium and start heading off-screen. Try it! Inspect a ball and change it mid-run.


Note: this description is different from the one which appears after following the tutorial documentation. This is because the tutorial documentation overrides the getInfo method to provide a description. If this method is not overridden, MASON instead tries to display a file called index.html stored in the same directory as the simulation (which is what's going on here).