CAD Team Attack !!!

It was the last day of my 6 weeks training. The day started in the Operating Systems Lab. Then there were two presentations on OpenJump Software. Openjump is an Open source Geographic Information System (GIS). OpenJump is named so because here Open means “Open source” and JUMP means “Java Unified Mapping Platform”. It is java based GIS. All the presenters did fabulous job. They presented a nice example on the topic “How to locate/establish Nuclear Power Plant in India”. They explained the example with OpenJump. Firstly, some shape files are imported into OpenJump. These shape files include data about the location e.g. map of India, rivers, capitals of states etc. Then there must be some conditions to be followed to establish the Power plant, as it can’t be created  anywhere. So this software helps us to geographically locate the areas by simply submitting queries like the location must be a capital, it must be located at a particular distance from cities, oceans etc. After submitting queries(conditions), OpenJump automatically returns the best location that satisfies all conditions. Hence it is a good software and can also be used in other fields.

So we reached TCC at evening. As it was the last day of many of the members of our team, there was an interaction about how we liked the training. Sir wished us all the best for our future.

# The football Match

As decided earlier, there was our football match at 6:00 pm. We all were in the ground and wasted some time in deciding team and players. Then the CAD project members got in one team and another team was of LibreHatti members. When teams were selected, our team looked a bit weak as the opponents had experienced captain and somehow healthy players than ours 😛 . After that the match started. None of our team was taking the game seriously. The focus was just on to kick the ball, snatch it from opponent and no matter where it reach after kicking. Even after 15 minutes of play, I hardly touched 2 or 3 times the ball. So I decided to be the goalkeeper 😛 . So our team had some great defenders. At about 7:15, gagan was about to leave and then magic occurred : our team fired a goal. Then we called gagan while he was going and he came back after hearing the goal news. Yeah.. Now we continued the match, the opponents had strong strikers, as they had good pass coordination. Many times they reached near our goal post, sometimes our defenders, me or by God’s grace , we managed to defend all their tries. A major time of game was spend by laughing in the ground by watching what other’s were doing. As a goal-keeper, I enjoyed the match and kept an eye on everyone. So enjoyed the match. Till the end of match, our team had the great lead of 2-0. Yeah, we won. So it was quite late and after having some conversation we leaved the ground and went to home. Really a enjoyable day. Don’t Underestimate anybody.  So that’s why I have chosen the title of this post. Our team really attacked the Librehattians.

GRASS – A Geographic Information System

GRASS GIS SoftwareThere was a presentation on a GIS software named GRASS by Ankur. GRASS is an open source Geographical Information System (GIS). Full form of GRASS is Geographic Resources Analysis Support System. This software can be used to manipulate raster, vector, image processing etc. The software imports a file containing some random points located at some location by surveying. In this case, the file was created in Microsoft Excel and contains points by specifying x,y,z co-ordinates. In the vector processing, the points are plotted as per the locations of points. Then in the raster processing, a surface is created. We can view it in 3D view and it can be easily rotated as per requirements.


Hatching with images !!

As the task assigned to me was about hatching. I was searching  about it on Internet from the last week. But it didn’t help so much. I came to know about various libraries like OpenGL and Cairo etc. during this session. As we were preferred to use Cairo to hatch an object, we tried with this. And we tried with image patterns to be filled within the objects. After some struggle, we got some results.The code is : By this time I learned to use github a little. My github link is :

We used an image like   new this one. And just put it into the program as the object background. But I think, we should do something extra.

There was another Latex presentation today Amitt and Ashu. It was about writing math equations and diagrams like we see in the Mathematics Books. Latex is the software that can do it easily. We just have to write appropriate code and that’s it. It shows the vastness of the software than Microsoft products. Because obtaining results like these are near to impossible if we compare the efforts. It was good presentation.

Hello Cairo !!

It is the last week of my training. Me with Gurpinder are currently working on cairo libraries to implement hatching concept. Now we are trying to use cairo to implement it. Cairo can be installed by using the following command in terminal:

sudo apt-get install libcairo2-dev

Cairo is a library used for creating graphics and can be used with other programming language like C for further implementations. After installation, we must include its header file as:
in the program. And during execution of program use,

gcc hello.c -o hello -lcairo

Here gcc is the compiler, and hello.c is the main source program written in C and -o is used to create executable file whose name is ‘hello’ and we can change that name to any. We must bind with the library while execution using -lcairo. Without it, execution will show errors. Then ./hello to execute the file.

#Hello World Program using Cairo

#include <cairo/cairo.h>
int main (int argc, char *argv[])
     cairo_surface_t *surface =
         cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 240, 80);
     cairo_t *cr =
         cairo_create (surface);

     cairo_select_font_face (cr, "serif", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
     cairo_set_font_size (cr, 32.0);
     cairo_set_source_rgb (cr, 0.0, 0.0, 1.0);
     cairo_move_to (cr, 10.0, 50.0); 
     cairo_show_text (cr, "Hello, world");
     cairo_destroy (cr);
     cairo_surface_write_to_png (surface, "hello.png");
     cairo_surface_destroy (surface);
     return 0;

Save this code in a file named hello.c then open terminal. Go to that directory where the file hello.c resides. Then type:

gcc hello.c -o hello -lcairo

Then you will notice that there will be an executable file created in the same directory. So execute that using this command:


Now a image hello.png will be created in the same directory. You can double click on that to open or open it using terminal:

eog hello.png

Knowledge Sharing Session

There was a knowledge sharing session till yesterday in the TCC seminar hall. As the name suggests, it was about giving seminars and presentations and sharing knowledge with all. I came to know about Aaron Swartz. Such a great Being he was. At the age of 14, he co-authored RSS. He fought for making web content free and open to people. Another group from college also took part in this session. They are working on Big-data. Nice seminars were presented. Learned something new.

4th June

Today there was another presentation on LaTeX by Satwant and Ravina. The presentation was about their task i.e. to work with latex to use different techniques. Hence it was nice presentation. They showed how a text can be formatted to appear in a shape like heart. You can visit her blog to see how to make heart shape. We can include a package to use any other shape. After that there was a seminar by Inderpreet Singh. It was on how to work daily. He explained about how to work constantly and where to work. He added some time management and time tracking techniques. He told us that working at morning (morning birds) is much better than working at night (night owls) and work by making schedule of 25 minutes of work and then break of 5 minutes and so on. But it will take some time to adapt these things. And try to eat, work and sleep at different workspaces.

Click Here to know what is LaTeX.


Qt is cross-platform UI and application development framework. Cross-platform application is that runs on different available platforms like MS Windows, Linux, Mac OSX etc. Scintilla is a free library that has text editing functions. It has many features for easy editing documents like syntax highlighting. Error detection, style, code folding and margin line numbers etc. are some another features. Geany and Notepad++ text-editors are based on Scintilla.
QScintilla is a port of the Scintilla C++ editor class to the Qt GUI toolkit. QScintilla includes features especially useful when editing and debugging source code. In simple words,

Qscintilla = Qt+Scintilla


Today there was a presentation on QScintilla. In this presentation, we were explained about developing an text editor.

The another presentation was about Thin Client by Gagan and Aseem.  Thin client is a machine with fewer resources such as RAM, processor and graphics card etc. Therefore the presentation was about installing an Operating System like Ubuntu on Thin client.  Thin client depends upon a server to fulfill its resource requirements. In this case, the thin client had 100 to 200 Megabytes of RAM and a very slow processor. Hence they used a Laptop with Ubuntu 12 as a server. Hence any laptop can be made to act as server by installing LTSP. LTSP is Linux Terminal Server Project. LTSP is a Thin Client Solution for Linux operating systems. To install LTSP :

Open terminal and type:

sudo apt-get install ltsp-server-standalone

Depending upon the architecture of thin client, run:

sudo ltsp-build-client --arch i386

Then in the boot menu of thin client change the following settings:

BIOS->integrated peripheral > network controller> enable
first boot > network


Means you just have to make thin client boot from the network. By default it is disabled. Hence old Desktops at your home that has minimal resources can be made thin clients and can be connected using a wire to your laptop(server).