GtkParticle simulates some point masses bouncing around in a 2-D square area. The physics of the collisions is classical Newtonian mechanics. The particles are defined (in terms of mass, initial velocity and position) by the user, and may be added and removed as desired. A particle's colour is indexed to its mass via a dynamically normalized colour map. As the simulator progresses the instantaneous value of the 2-D pressure is displayed, along with the average energy, total energy and number of particles.


This is really just an excersice for me to learn gtk+ and C++ using an application I can relate to. Although I could see it having an application to highschool or grade school physics courses, maybe after some more development.


I wrote gtkParticle in C++. This goes against the gtk developer's philosophy, since C is more portable. However this was an excersice for me to learn C++, so there you have it. The result is that where possible and logical I have wrapped things into classes, but much of the code is C-like since gtk+ is written in C.


Everything is GPL, freely re-distributable.


Any and all comments, suggestions and criticisms may be directed to . I will try to answer what I can.