Indice

Click here to download version 1.4 of gvb.

Click here for the Debian/Ubuntu package.

What is GVB?

GVB (Good ViBrations) is a small program to simulate vibrations in 1 and 2 dimensions, written by me (Pietro Battiston) in March 2008 as a university “homework”. Here are some screenshots.

It features several calculation, drawing methods and starting positions and the ability to dump frames to png (so that they can be used to build animations).

It uses scipy for calculations, Gtk (pygi) and Glade for the user interface and Cairo for graphics.

Gvb development is substantially finished, so don't expect big “spontaneous” improvements. However, in the remote case someone is interested in some particular feature (for example from the wishlist), I could actually implement it, and if someone spots a bug I will probably fix it, so feedback is welcome: me [at] pietrobattiston [dot] it.

Where can I get it?

You can always find the last version at the address http://pietrobattiston.it/gvb

OR you can get last development GVB with git:

 git clone git://pietrobattiston.it/gvb

OR if you use Debian (at least Lenny) or Ubuntu (at least Intrepid), just install it from the repositories, with synaptic or by giving the command:

 sudo apt-get install gvb

in a terminal.

(N)FAQ

I first started writing gvb in C. After some weeks, it finally had a decent interface, but I still had big problems with calculation methods I wasn't able to debug.

Then, one day, I decided to start again from scratch in Python. After one week, gvb was finished and was more complete than what I planned.

GVB relies on scipy for the calculation, and scipy relies on Lapack and Blas, and Lapack and Blas aren't slow (and they are compiled C or Fortran, not Python). So don't worry. If GVB is slow, it's because the calculations to do really are hard (or eventually because I did a mistake). To spot the difference between “Python code” and “Python relying on scipy”, see the performance improvements between “naif” (pure Python) and “matrix” (scipy) methods.

Those possibilities are not provided by the GUI, but this is not a big problem: you can create your own start position as a simple text file containing the shape (how many rows, comma, how many columns) of the grid on the first line, the positions (just a long list of comma-separated values; first the first row, then the second…) on the second line and the speeds (again, a list of comma-separated values, eventually comma-separated zeros) on the third line, and a newline character at the end of the file.

If you have avconv installed, move to the directory where the pngs are and (supposing there are only those png) give the following command:

avconv -i %08d.png video.mp4

License

Gueic is totally GPLv3

Wishlist

I will maybe do none of those things. But if the program actually catches some interest and if I have some spare time, I could implement some. So if you are interested (and more still if you are offering to help), please contact me.

  1. Threading may help separating scipy calls from GUI so that program doesn't stall during intense calculation
  2. Some heuristic could be used to anticipately estimate time needed for intense calculations, so that a progress bar could be shown
  3. Some exception catching should be implemented (e.g: permissions not owned to write to a file, or not enough memory for a given calculation actually leave the program in an unpredictable state)
  4. It wouldn't be hard to provide the ability to handle 3D “vibrations” too… but calculators would be slightly less simple than 2D ones, and drawings much more confused
  5. The ability to apply masks (select a set of points in the 2D grid that are fixed) would allow observation of interesting (and, for example, more regular) vibrations.
  6. The possibility to highlight nodes (points that do not move) would be nice.
  7. Some dampening could be allowed
  8. Elasticity and mass could vary from point to point
  9. At the moment, the editor allows the creation of nearly every conceivable 1D start position. Instead, something better could be implemented to create 2D start positions.
  10. There should be the possibility to set rectangular (non square) grids.
  11. Creation of start position and drawings could be optimized a lot.
  12. When dumping to png, plotting to screen should still be enabled.
  13. The ability to output a .wav file to make you hear the vibration of a given point would be nice.
  14. In the “eig” method, the operator matrix is very sparse. This could make the process of calculating its eigenvalues and eigenvectors much faster, but I'm not really sure and scipy released version still doesn't implement anything useful (as of March 2008)
  15. Ability to remember some preferences (e.g: last configuration seen, last methods used)
  16. Ability to save some “metadata” to files (e.g: calculation data)
  17. gnome.help_display('gvb')