Creating movies from multiple jpg picture files

In my research, I produced a number of figures of time sequences. And I wanted to create a movie from this multiple jpg files. I use mencoder to do this, to install type:

sudo apt-get install mencoder (if you are using debian based such as ubuntu)

Then to create the avi file, simply type:

mencoder mf://@list.txt -mf fps=5:type=jpg -ovc lavc vcodec=mpeg4 -o test.avi

where list.txt contains the list of jpg file name that I want to convert. Of course we can simply use mf://*.jpg, however since my jpg file name is like 50.jpg, 100.jpg, 150.jpg, the files are not put in the right order, it will start with files beginning with “1…” first. So I save the correct order by typing:

ls -rt -1 *.jpg > list.txt

this will save the jpg files sorted in time sequence in one column into the file list.txt.

Why the sky is blue

If you don’t know why the sky is blue, you may want to read up this article:
Blue Sky

It is interesting and shows some physics of absorption and emission of light in day to day things you can see.

Changing background and front color in plplot library

The default background color in plplot library is black while the frontcolor is red. To do this, use plscolbg and plcol0 function. The code in fortran is:


call plscolbg(255,255,255)
call plinit()
call plcol0(8)

Remember that plscolbg must be called before plinit. The above code change the background color to white (rgb=255,255,255) and the front color to brown (8, refer to manual).

Note also that changing the background color will affect the color map 1 which is used for plotting continuous data. The reason is that color map 1 range from blue to red passing through the background color (default).

Kubuntu 9.10 is shining

I have been using Ubuntu 9.04 since it just works. The previous version of Kubuntu is pretty difficult to use. When using ubuntu, everything just works, I can watch video streaming, plugin downloaded autmatically, etc, etc.

So recently I have upgraded to 9.10, and I am so impressed with KDE 4. At least now the wireless network manager is working, last time I have to use WICD to connect to wireless. I am tempted to switch back to Kubuntu. I will give it a try again. can’t wait to play around with it.