 |
Tutorial 4: Particles
By Sean Luke
|
[Tutorial 4 documentation]
Part B (after Tutorial 3) of 2D particles bouncing around on a grid. When particles intersect, they each choose a random direction to go (including staying put). Particles bounce off the wall and leave trails.
This version adds a large red particle whose path does not change, an an additional display. You can inspect the red particle and alter its direction.
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).