Saturday, June 27, 2009

A Way With Words

I came across this highly interesting quote made recently by a popular Judge while speaking at some function in Madurai:

"Abraham Lincoln's statement that 'Democracy is of the people,for the people and by the people' is entirely true even today except that the spellings have slightly changed.Today, 'Democracy is off the people,far the people and buy the people' "!!

I should add that some Judges have a good sense of humour at the court.For instance, in a recent case a guy tried to vandalise some statue.The Judge in question, rather than passing the customary judgement of a few days imprisonment, ordered the guy to spend an hour every day at the Gandhi library reading books on and by Gandhi!

In another case, when a person trying to settle some personal scores filed a Public Interest Litigation(PIL),the court remarked:
"PIL is not a pill for every ill!Approach the court through proper channels"

eMac,Gcc and Graphics.h

We are back where we began.Nearly a year after we pulled off a coup by installing Ubuntu on the rather dated Apple eMacs of our lab, we were summoned back with the unenviable task of running 2d/3d animation C programs in the boxes.This ,of course, was not possible using the archaic Ubuntu 5.04,so we were off installing 8.04.Doing this was no great deal, once you figure out that you have to use the option 'live video=ofonly' when booting from the CD.

The graphical display does not work once the CD has booted ,so go to the command prompt (Ctrl-Alt-F1).Copy everything from here and save the file as xorg.conf.Now replace the file /etc/X11/xorg.conf with the file you just created and type 'sudo /etc/init.d/gdm restart'.OK,so installing Ubuntu was no big deal.But how do you run graphics programs when you consider that GCC has no graphics.h library?

Google came to my rescue yet again and I landed myself with this invaluable link.The libgraph source given in the link works equally well for Ubuntu's powerpc version and we got 2d programs up and running in record time!For 3d programming ,you need the header GLUT.H.Fortunately you don't need to compile a source file as all you need to do is to install the Ubuntu repository package 'libglut3-dev'.

Was it worth the effort?Yes,when you consider that we can now claim to have setup an entire Lab all by ourselves.But as part of my search,I also learnt that graphics.h is not present by default in gcc's library because it is considered to be outdated and of no practical use today.It's only purpose is to help students learn outdated code and pass a paper called "Computer Graphics"! :(

On the other hand, OpenGL/GLUT is a popular tool for 3D programming,especially games and multimedia.BilliardGL is a particularly popular game created entirely using OpenGL.So I guess it was worth all those bunked hours after all!

Wednesday, June 10, 2009

"Breaking" News

Here is a video dedicated by a fellow blogger "to all those who enjoy watching accident videos in YouTube".Hope you enjoy it too ;)

The best comment on the site where this video was posted was : "Hey!I want my 29 seconds back!!"