Tuesday, October 8, 2013

Sense of satisfaction

I often conduct lectures for Gate coaching in some institutes . I started this as hobby and now finding myself pursuing it as second carrier/profession .

When I was in school I was always forced to sit in last row(because I was among taller students in class and If I sit anywhere in between it would block the view for boy sitting behind me). Anyway I enjoyed sitting in last row. There is always masti on last bench. People would eat their tiffin while lecture is going on. Would pass some comments or do something which would irritate class teacher.
Since I was sitting in last row all the time in my school days, I was friend with students who were not very good in studies. And I being good in it, they would always take my help in completing assignments, solving question etc. We would often study in groups and I would spend lot of time explaining them concepts. With this I learned to teach and help students. I never knew at that time , that this would be my profession some day. Today I am happy that I am getting to teach / guide students in their studies. It gives sense of satisfaction which our professional job may not give.

SO On one sunday I was conducting Networking class and During break I was just checking out notice boards of Gateforum and found some feedback notes of some previous year students and in one of them I found my name. I felt so good to read that. I even took snap of it to show it to my mother.:-)

Such appreciation notes are worth much more than money. Something money can't buy.

thanks to All students who appreciate the work.
 

Friday, August 23, 2013

Shaders in OpenGL

Hello All, (this is only for techie guys)
I have started delving into So called shaders in openGL. When I learned about it for the first time, I was overwhelmed and at the same time unsure about the use of it . Shaders are small program which takes care of drawing your scene pixel by pixel. Similar to the way we did it back when we were in college. Thought that was very primitive in 16 bit graphics. THis is more advanced but any way you get the point. So shaders are program which remove Fixed pipeline used by opengl to render and Instead gives us control to determine how to shade objects.

Though this seems ardent task , its really not that hard and we can get away with some simple shading pretty easily. Even you can simple download shader programs for fixed pipeline used by opengl and make your ammendments to it.

Anyway Back to topic. Clearly its useful to make use of shaders than relying on opengl fixed pipeline to draw your objects. So what do we do ? Learn it.

There are 2 types of shaders.
1. Vertex shader
2. Fragment shader.

vertex shader is called for every glVertex3f call that we make.
and fragment shader program is called for every pixel that opengl tries to render on the screen . Before we used to set color, texture , lighting properties and let the opengl interpolate and do the calculation of determining color for the individual pixel that its wants to render. But now that control is in our hand.

With this control we can play around with normals and make use of normal map more efficiently. This lets us render more complicated shapes with less complicated geometry. Isn't it cool feature.
Indeed it is. SO have fun. Search for more on this topic. Try some simple programs and make use of best of GPU computation.

Happy coding. Bye for now :-)

Lighting in OpenGL

My new work demanded me to have knowledge of lighting in openGL. I set forth for it. I understood that there are mainly 3 types of lighting sources used while rendering any graphics scene.
They are
1.Ambient lightsource (This is coming from all directions equally)
2.Directional light source (This one is fixed in space and as we move object / view it moves along. It shines fixed portion of the object all the time.)
3.Observer light source  (This one is coming from the direction of viewer. So no matter how y twiddle the object its always going to light the portion facing you).

SO I played around all 3. I used directional light source and changed its position by rotation the source angle in each iteration and rendered the screen. It gives nice effect. Here I am attaching snapshot of it.

Saturday, August 10, 2013

English Vinglish 2

This happened when I was studying in Diploma College. I would take tiffin box(ghar ka khana) with me. One day I was sitting on Katta and for some reason it was only me and Mukram(my friend) was not having any practical and were free during lunch time. I was hungry so I tool out my tiffin box and started eating. Mukram was sitting idle. I thought he didn't bring his tiffin today so i asked him to join me. He said "I have fast". At that time only meaning of "fast" i knew was in context of speed. :-) So I didn't hear him properly and I thought he wanted to say that he eats fast so will join me later. I already finished my tiffin half way. I again asked him please join. he again repeated same thing. this Time I said to him.. " no problem , even I eat fast! " :D :D
He was puzzled with my statement. this time he said in hindi. "mera upvas hai" then it clicked me "oh. ok upvas. Good".

that incident added one more word to my vocabulary.

Friday, August 9, 2013

English-Vinglish 1

Its funny how you remember some incidents in your life. This one is quite old during my Diploma College. I was studying in Pimpri Chinchwad Polytechnic. Coming from bit rural background and marathi medium I was not very good at English. In this regard all my friends were much better than me. They were all from english medium. So they knew english words much better than me.

At that time I didn't know the meaning of word ASS. Though there are multiple meanings to this particular word we all know which one is famous. Still at that time, i was unaware of this famous meaning and hence when our teacher gave us list of assignments to be done in Diwali vacation, with my heroics I did all of them plus the ones which Mam was not expecting before time. The only problem with my work was I named all my assignment programs with naming convention as "Ass1.c" "ass2.c" "ass3.c"  ... and so on "assn.c"

When We came back from vacation, I think I was the one bragging with all assignments done . I went to Mam and told her that I have done all assignments. Firstly, she couldn't believe. Then I asked her to check it on computer. My couple of friends were with me. She said fine, and I copied assignment programs from Floppy. I started showing her one by one.
"this is ass1.c"
"should I open ass2.c?"
"lets see ass3.c"

When I started with that I observed that Mam's face was turning pale and she was embarrassed. I didn't know why. So do my friends. She said fine. She is happy with work. and you can leave.

Its only when one sardarji from my class saw those assignment names and found something odd about it . He said, "I think you should know meaning of word before you start using it. Do you the meaning of this ?" pointing to assignment name. I said "No". He said check it. :-)

When we came to know the real meaning of that word, we couldn't stop laughing. as we knew why mam's face turned blue on seeing those assignments.

Anyway that incident added this nice word to our vocabulary . these days i hear this a lot when I watch english movies. I really think English movies should be bit more sophisticated.Too much F words and A words.