Posts Tagged ‘ubuntu’

Qalculate!

January 31, 2015

Just a note of thanks to the authors of Qalculate! because I’ve just discovered it today. My elderly Casio fx-7700GB has started to consume batteries like Smarties. With Qalculate! I can continue to do calculations with fractions so I don’t lose precision to decimals in my Circuit Theory homework.

Installing it on Ubuntu (assuming you’re using the default window manager) makes it less pink as well.

Advertisements

Printing an image larger than the paper size.

February 6, 2014

This another of those “for personal reference posts”, although it might be useful for others. Like many of my posts on computing, this is relevant to Debian-derived Linux i.e. Ubuntu.

If you want to print a banner, or poster, and only have a printer which can print on (say) A4 paper then there is a simple solution. Save the image at the correct size in EPS format. I used Inkscape for this, and I had the paper size set to 1100mm by 550mm.

Check that poster is installed (if not, it is available in the standard repositories).

The command to print my design at 1:1 scale, using A4 size pages:

poster -v -mA4 -s1 InputFile.eps > PrintMe.ps

The switches specify verbose output (-v), use A4 size paper (-mA4) and that the scaling factor is 1:1 (-s1).

The output file can be printed from Evince, or your favourite Postcript-aware application. It is worth reading the manual for poster too.

Rendering images in 3D for your 3D TV with POV-ray.

November 19, 2013

Having a little bit of spare time this week, and being aware of the broadcast of “The Day Of The Doctor” in 3D, I have turned my attention to making sure the 3D function of my TV is working properly.

The problem is content, or how to get it without paying for it. A solution would be to make it from resources already available for free.

There are many Ray-tracing software packages available, one of those is POV-Ray.
I’m using version 3.6, I know version 3.7 is now available but there might be unanticipated features. In common with some of my other compute-oriented posts I’m using Ubuntu Linux. Pre-compiled windows binaries of POV-Ray, Imagemagick and EXIFTool are available.
I acknowledge the hard work and expertise of Friedrich A. Lohmüller with his excellent pages on the subject of rendering stereo pairs with POV-Ray here.

I have tested the output with my Panasonic TX-P42UT50B TV and the corresponding 3D glasses for it.

After installing POV-Ray, and checking you have the other software Imagemagick and EXIFTool available, you need to choose a POV-Ray scene file to render. For my test I used the woodbox.pov scene from the folder /scenes/advanced.

You will need to modify the scene file, so copy it and insert the lines which begin “// stereo view:“. The the scene file will have a camera declaration already, so make a note of the location and look_at co-ordinates. Copy these in to the stereo camera section, then you can delete the now-redundant (non-stereo) camera declaration. Save the scene file.

On Friedrich A. Lohmüller’s page there is a short .ini file. You need to copy this file to your work folder. You must use the same name for your scene file, and the .ini file. This .ini file automates the rendering of the left and right eye images.

At this point it is a good idea to do a low-resolution test render of your image. If your scene file is called test.pov and you should have a file called test.ini in the same folder. Run this command:

povray test.ini +Itest.pov +Otest.tga +W480 +H270 +FT

The result should be two images. You can view them in your favourite image viewer, but if you want to view them in 3D there is a simple way to do that. Run this command:

montage test1.tga test2.tga -geometry +0+0 stereo.png

To make a side-by-side image suitable for cross-eyed viewing.

You might find the camera is too close, or too far away from your scene. You can adjust the camera location by changing it’s position as defined on the line:

#declare Camera_Position=<x,y,x>;

What you’re actually changing is the centre-point between the two viewing positions, left and right. Re-render the preview until you’re happy with it. When you are ready to move on to the next stage do this:

povray test.ini +Itest.pov +Otest.tga +W1920 +H1080 +FT +A0.3

It’s probably a good idea to make yourself a cup of tea at this point. When the rendering is complete, the next task is to make the images viewable on your TV. Convert them to the JPEG format:

convert test1.tga -quality 85 test_R.jpg
convert test2.tga -quality 85 test_L.jpg

This last step is to convince the TV that the images were created at the same time, use EXIFTool to make the Create Date tag on both images identical. Note that the content of the tag does not need to be accurate, just match on both images:

exiftool -CreateDate=201311191000 test_L.jpg -overwrite_original
exiftool -CreateDate=201311191000 test_R.jpg -overwrite_original

Copy the images to an SD card, and insert that in to your TV. With my TV, you need to tell it that you want to view a stereo pair. Having started the photo viewer on the TV, press Option and it’s the second menu entry. Choose the left image first with the red button. The letter L appears before R in the alphabet, and the TV always sorts the images in the same way.

The times, they are changing.

June 8, 2013

Yesterday I was surprised by something. A friend of mine has been a very loyal Windows user since Windows 98. Yesterday he tells me that he is seriously considering installing Ubuntu on his next computer. I nearly fell off my chair!

Obviously, I will help him as much as I can. It shows that something which (not too long ago) was seen as a niche and nerd thing, is now on the verge of being mainstream. It’s a very bold decision to make, to fundamentally change how you compute.

Getting the track listing for a K3B project.

March 22, 2013

Just a nod to Philip Yarra for figuring this out. Thank you, I found it useful.

Getting the Christmas geek on.

December 25, 2011

Firstly, I wish all readers a very happy Christmas. Or you can call it Saturnalia if you prefer.
Recently I saw this video, and I was struck by the creativity and level of effort invested by the creator. I could talk in great detail about how stepper motors can be driven at different rates to give different sounds. I could talk talk about how the simplicity of the harmonies of the sinusoidal waves give a pleasing and elegant sound – to my ears at least.
Over-riding all that is the idea that House of the Rising Sun is (for me) a classic song, from the days when musicians actually worked for a living, and wrote good music. Your mileage and musical tastes may vary.
Since I first saw that last week, I had an idea rolling around my head. There is a point in the video where that charming old oscilloscope is showing a sum of two waveforms, and the faster wave seems to be being modulated by a much slower wave. It’s at the 4 minute 20 mark from the start.
For me, this seems to be an ideal source to make an animated GIF.
I downloaded the entire video from youtube, and used the open source video editor PiTiVi to cut out the frames I wanted to re-use.
So I have a short mp4 file, and to convert it to individual frames I used mplayer:
mplayer -vo png oscope.mp4
In this command I specify that the Video Output should be in the PNG format, and to use the “oscope.mp4” file as in the input.
This gives a bunch of PNG files, all of the form “f00000001.png” where the number part increments.
The next step is to convert them to an animated GIF. I’d have liked to have used Peter Hartley’s InterGIF, but I couldn’t find find it in the standard Ubuntu repositories, and I couldn’t get it to compile on my Ubuntu box. That’s a problem for another day (or I can move the GIF files to my RISC OS box and use the RISC OS version of InterGIF).
I used ImageMagick which I installed on my Ubuntu box a long time ago:
convert -delay 3 -loop 0 f*.png OscopeLarge.gif
What this does is to take all the files which begin with “f” and are type PNG, and convert them in to a GIF file with a delay of 3 hundredths of a second between them, and that they should loop forever.
That gives a 13Mb GIF file. It’s very nice, but it’s a bit big for folk who like an ‘old skool’ animated GIF.
Going back to ImageMagick, and using the resize option:
convert -delay 3 -loop 0 -resize 640x360 f*.png OscopeMed.gif
convert -delay 3 -loop 0 -resize 320x180 f*.png OscopeSml.gif
These commands give the Medium and Small versions, which have sensible sizes of 3.5Mb and 997Kb respectively.

Update:
I’ve run the animated GIFs through Peter Hartley’s InterGIF. The medium version was reduced from 3.5Mb to 2.7Mb, and the small version was reduced from 997kb to 692kb. That’s about three-quarters in both cases. I’ve substituted the files on the server, as it will ease the load for my provider.

Updated Ubuntu Linux on your Sony notebook, and lost the display?

July 4, 2011

If your Sony notebook has Nvidia graphics, you probably need this solution here. It worked for my VPCS11C5E with its GeForce 310M GPU, running Ubuntu 10.04 Lucid Lynx.
Now if anyone can make the HDMI output work with Ubuntu, I’d be grateful to know how you did it.

Update 29/6/2012:
I re-read the post I linked to earlier, and followed the author’s suggestion about commenting out the Option lines when the driver has been updated.
Well, the driver has been updated several times since I last looked at this issue. Also I have updated the version of Ubuntu to 11.10.
I now find the HDMI and VGA outputs work, and that the connected display is detected correctly with the NVidia X Server Settings application.
Brilliant!

The VGA side seems to be limited in what resolutions it will do though. I’ll crack that later.

MSI Wind U135DX – Ubuntu 10.10 – Wireless and shutdown issue fix

March 13, 2011

Installing Ubuntu 10.10 (Maverick Meerkat) on a MSI Wind U135DX has been nearly straight-forward. Remember that the hot-key to turn WiFi on and off works at a BIOS level, so it doesn’t matter what operating system is running. Or not.
The only snag I’ve found so far is related to turning the “netbook” off. I found this page which helped a lot.
The author there writes:

Blacklist the old drivers used for the 3090 wireless chip.

sudo nano /etc/modprobe.d/blacklist.conf

add the following at the bottom

blacklist rt2800pci
blacklist rt2800lib
blacklist rt2800usb
blacklist rt2x00usb
blacklist rt2x00pci
blacklist rt2x00lib

He then goes on to manually install the correct driver. I found it was only necessary to blacklist the drivers. The current linux kernel is 2.6.35-27-generic.
Although the WiFi adapter is a RT3090, the RT2860 driver seems to work with it. I’m not sure if it works with a WPA2 wireless network, I’m using WPA-PSK for various backward compatibility reasons.