Tuesday, July 21, 2015

Boolean Expression Evaluator : App by Karthik


This is an app by a friend, based on the Logic Lesson in Discrete Mathematics.

App Link

You can send your feedback and appreciation directly to him at : karthik_m_a_m@outlook.com

He develops apps under the name of Kappspot ( www.kappspot.yolasite.com )



Sunday, July 19, 2015

IP Lab : Java GUI based on Frames


I had a tough time searching google for this one.

Many sites talked about something called "Swing" for GUI Java Applications. It's some widget toolkit. Which is the new one, actually.

But Felix Mam was actually showing some codes in Internet, in class, and it was something different from what I saw about Swing. Then later, I realized, she showed the code based on AWT (Abstract Window Toolkit) which is an old one compared to Swing. Swing is some sophisticated thing it seems. That's what Google says.

I am gonna follow Mam and code using AWT stuff.

So, here's some basic material I found. I will post more when I find more. Even you could Google about AWT and AWT Events.

http://www.studytonight.com/java/java-awt.php

http://java-demos.blogspot.in/2012/10/close-awt-frame-in-java-using-windowlistener.html

http://java-demos.blogspot.in/2012/04/using-windowlistener-for-awt-frame.html

http://www.landofcode.com/java-tutorials/java-gui-layout.php

Saturday, July 18, 2015

Computer Graphics : Transformations


According to the lab exercise, we need to use homogeneous coordinates. That's a catch, since we need to use matrix and stuff for that.

I started out with the basic implementation, instead of the matrix stuff. Here's a code for the basic thing. You could build it up in a similar manner for the homogeneous coordinates implementation. I didn't do shearing and reflection :P

Code

PDF to learn the transformations :

PDF

Thursday, July 16, 2015

IP Tutorial Problems Solutions


These are some of the solutions for the tutorial problems.

I am uploading whatever I have and whatever I am coding.

Keep checking the link for solutions to other problems.

For updates, may be you could send me a mail to add you to the exclusive subscribers group.

Tutorial Problems and Solutions

Saturday, July 11, 2015

IP Lab Ex 3 : Socket Programming - UDP


Now, we gotta learn some basics in socket programming in Java. You could use internet and check out about it. I have a basic code over here, that I found in many sites :

Source Code

And in this code, they used BufferedReader Class Object and all, for obtaining the input from the user. You could actually use the one with the Scanner Class Object.

Rest of the code is kinda self explanatory, based on networking. And there is a while loop in the server code, just to show that the server is infinitely running and provides the service to many clients.

Friday, July 10, 2015

Computer Graphics : Target Board


Drawing the target board is a just very simple. You just need to code for circle, then draw concentric circles.



Computer Graphics : DDA Algorithm Implementation


Now this is revisiting for those who saw the old post or just saw the lab exercise Q, and tried something in DDA and got some output. For others, it's totally new and an easy road, since I am giving a part of the code. But seriously, I recommend you try something at least, before seeing my code, or else...it's like you telling yourself that you can't code it. So, have some self-respect.

DDA Code

It's just a part of the code. I was actually thinking to put up the simple math, using which I arrived at this implementation. Then I felt that you can do it yourself. Just in case you have problems with the math, the equations, the conditions and how they are justified, just mail me. I will explain it.

Besides, you might think DDA is just too simple and that these many posts might not be needed, remember, even these small things matter, if you can understand this, you can move forward to Bresenham with some confidence. It's all about math and understanding. And if you understand Bresenham, then Circle and Ellipse will follow one by one. It will be like a piece of cake. I will try putting up an explanation for all the equations.