This page is about my 2D colliding balls simulator. It is a discrete-event simulator of Newtonian mechanics, with fully elastic ball-ball and ball-wall collisions. It can handle a fairly large number of balls because the simulated model is subdivided in cells (rectangular compartments). But enough talk, let's start with some screenshots!
The classical pool table setup | After the first hit ... |
---|
The real power of this simulator is its ability to read configuration files. These files are specified in a medium-level programming language, and can therefore be quite complex. See for example this collider file (0.80 KB). The following screenshot was made during the simulation of that file.
Eight-sided pool table, radial launch of multiple balls |
---|
Here is another example of a simulated collision. We use balls of different mass. The purple balls come from below, and uniformly speed toward the black ball triangle in a square. The impact is quite small, for the purple balls are very light. It takes a long time before the black balls are uniformly distributed over the enclosing many-angle.
And here is another one:
The executable archive is here: JAR (0.53 MB). You can find some example initialisation files here.
The program is copyright 2005 by Wouter Koolen-Wijkstra. You can download the source code here: ZIP (46 KB). The code is released under the terms of the GNU GPL