Questa è una vecchia versione del documento!
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.
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.
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
Gueic is totally GPLv3
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.