Engineers-Hub

DDA program

                           DDA Line Drawing program in c



#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<math.h>
void main()
{
//variable declaration
int dx,dy,length,x1,y1,x2,y2,k,p,q;
float x,y,m;
float stepx,stepy;
//to autodetect the graphic drivers and mode
// set gd=DETECT,DETECT is a macro declared in graphics.h
int gd=DETECT,gm;
//call the pre-defined method initgraph with the address of gd nd gm


//input
printf("Enter the x co-ordinate of start pt\t");
scanf("%d",&x1);
printf("Enter the y co-ordinate of start pt\t");
scanf("%d",&y1);
printf("Enter the x co-ordinate of end pt\t");
scanf("%d",&x2);
printf("Enter the y co-ordinate of end pt\t");
scanf("%d",&y2);
//diff. in x co-ordinate
dx=(x2-x1);
//diff. in y-co-ordinate
dy=(y2-y1);
if(dx>=dy)
length=dx;
else
length=dy;
stepx=(float)dx/length;
printf("%f",stepx);
stepy=(float)dy/length;
printf("%f",stepy);
x=x1;
y=y1;
getch();
initgraph(&gd,&gm,"c:\\TC\\BGI");
//setviewport(getmaxx()/2,getmaxy()/2,getmaxx(),getmaxy(),100);
//for loop to print the line
// with every iteration x increases 1 and y by the slope
cleardevice();
p=getmaxx();
q=getmaxy();
line(p/2,0,p/2,q);
line(0,q/2,p,q/2);
for(k=1;k<=length;k++)
{
//use the putpixel method of graphics.h
delay(50);
  putpixel((p/2)+x,(q/2)-y,25);
x=x+stepx;
y=y+stepy;

}
getch();
//close the graph and come back to the text mode
closegraph();
}


Direct source code:-Download



                                     output


NOTE:-Since i did not find a complete dda program anywhere on the web,which works fine with negative values as well as with other quadrants,so this is what i have tried to achieve those requirements.If their is anything wrong in this program please let me know,i will surely try to correct them.




Your feedback is valuable for me


READMORE
 

ctnc june2010 paper solution

READMORE
 

How to customize desktop

Customize Your Desktop



Every individual wants that their desktop should be arranged in a way they want it to be,and not the way microsofts os arranges them.
So here i am with a small tutorial,on how you can easily customize your desktop,by using some of the free tools and the .net framework.
How to install .net framework is discussed in the previous pages,if you haven't installed .net yet,please go through the previous post and install it.

Now without further delay,lets start customizing our desktops

step1:Install the .net framework 3.0 or 3.5

step2:Download fence from the link given below,the name of the software is fence

Download Fence

step3:Download Rocket dock,search it on google and you will find the download link

step4:Install Rocket dock and Fence

step5:Download some hd wallpapers and your done,fence is easy to use,just follow the procedure

and you will have an amazing looking desktop

Note:The best part is it doesnt degrade your computer speed


For more information,watch this Fencevideo


Here is a snapshot of how by using fence i have arranged my desktop.All your valuable comments are most welcome,if their is any query regarding this,please feel free to post it over here.




READMORE
 

.net framework

DOWNLOAD COMPLETE MICROSOFT .NET FRAMEWORK 3.5 SETUP

Many new Windows applications requires latest version of Microsoft .NET framework which is version 3.5 at the time of of writing of this post.
If you go to Microsoft download center, then by default you will get live installer of approximately 2-3 MB’s while complete .NET framework requires 50-200 MB. Actually on the same page there are links to complete setup but they are placed in a way that anyone can hardly notice them. Seems like Microsoft wants you to download live installer but there are problems with live installer…
  1. It may hang forever if you have slow internet connection like dial-up, GPRS, etc.
  2. You can not use it at all if your computer is not connected to internet 
  3. Also if you are running pirated Windows better not to use any software/installer from Microsoft which connects to Internet.
Here I am giving you links to complete Microsoft .NET Framework 3.0 & 3.5 setups which are gathered from Microsoft pages (links: v3.5 & v3.0)
# Microsoft .NET Framework 3.5 Setup




# Microsoft .NET Framework 3.0 Setup



Do not worry about authenticity of above links as they are from Microsoft’s server!





READMORE
 

ppt on microprocessors

                Powerpoint presentation on microprocessors




Some of the snapshots are given below,if u like them then download the ppt,i hope it helps you all






DOWNLOAD


READMORE
 

VLC media player for Android

 



VLC media player for Android beta is now 

 

available for download 

 

 

http://gadgetsolutions.in/wp-content/uploads/2012/07/VLC-Media-Player-Android-App.jpg

 

 

http://ticker.ttsh.netdna-cdn.com/wp-content/uploads/2012/07/vlc-android.jpg

 

Naturally being in beta, the app might be unstable at times, although most of the early 

feedback is positive.Mind you, it’ll run only on devices with an ARMv7 processor, 

which supports the NEON engine. The player comes with a nice widget that allows you to 

play, pause and stop any music track you might be playing with it.At this stage all but the 

cheapest Droids have a qualifying CPU,but if yours isn’t on the list you’d be glad to know that 

an ARMv6-loving version is also in the works. There’s also going to be a tablet-friendly

 release of the VLC player for Android. Follow the source link below to get the VLC player beta

 and don’t forget to share your first impressions on it with the rest 

of us in the comments section below.

To download the vlc for android please click on download below:-


 

 

READMORE
 

Angry birds on xbox,ps3 and nintendo



Angry Birds to hit Xbox 360, PS3 and 

 

Nintendo 3DS later this year 

 

 

 

http://www.oxmonline.com/files/u49901/oxm_angry_birds_big.jpg
http://www-xbox360.com/wp-content/uploads/2010/12/7th-XBOX-360.jpg

 

New Angry Birds versions that are being “built from the ground up” will hit the Xbox 360, PlayStation 3 and Nintendo 3DS in the holiday season. 

The game will be distributed physically on discs (Xbox 360, PlayStation 3) and a 3DS cartridge. There is no info on the pricing just yet.

The console Angry Birds offerings will include the original Angry Birds game, Angry Birds Seasons and Angry Birds Rio. It is yet unknown if the game will pack all the levels available on iOS and Android.

The fact that Rovio rebuilt the game from scratch for the consoles allowed the devs to include animated backgrounds, new and better effects, HD (and probably Full HD) resolution support, etc. MS Kinect, PS3 Move and 3DS StreetPass support is going to be included as well.

There will be new leaderboard and achievements system as well as individual score charts for each level.

Angry Birds for consoles is coming this holiday season.

READMORE
 

Notepad Tricks: Cool Notepad tricks for Windows


Notepad Tricks: Cool Notepad tricks for Windows



Notepad, the text editor that comes bundled in Windows is an excellent tool for text editing. But that is not the only thing for which notepad is famous. It is also famous for its tricks and hacks. Here is a roundup of some of the best and coolest tricks that you can try using Notepad.


Matrix Falling Code Effect - Notepad CMD (.BAT) Tricks

Inspired by the movie Matrix, this falling code trick is extremely popular on social networking websites. Copy and paste the code given below in Notepad and save the file as "Matrix.bat" or *.bat. 

@echo off
color 02
:tricks
echo %random%%random%%random%%random%%random%%random%%random%%random%
goto tricks
Notepad tricks

Upon running the bat file, you will see the "Matrix falling code" effect.

Create a Harmless Funny Virus with Notepad-Continuously eject CD/DVD drives

This VBS trick will create a code which will continuously eject all your connected Optical drives. If you put them back in, it will pop them out again. Copy this code and paste it in Notepad as Virus.vbs or *.vbs.

Set oWMP = CreateObject("WMPlayer.OCX.7")
Set colCDROMs = oWMP.cdromCollection
do
if colCDROMs.Count >= 1 then
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next
End If
wscript.sleep 5000
loop

Double click to open this file and you will be impressed by this awesome trick.

To close any of the VBS trick given, open task manager and close the wscript.exe process. These tricks work onWindows 7Windows Vista and Windows XP.


Make a Personal Diary(Log) with Notepad (Easter Eggs)

Notepad Diary
Notepad Diary
You can use this trick to create a personal log with Notepad which will automatically include the current date and time before your note. To do so, open Notepad and type .LOG in capital letters and press Enter. Save the file. Now, every time you open this file, notepad will automatically insert the current time and date before the note. Just enter your note and save the file each time after making an entry.

All these Notepad tricks are totally harmless and would not harm your PC in any way.  To close any of the VBS trick given, open task manager and close the wscript.exe process. These tricks work onWindows 7Windows Vista and Windows XP.

READMORE
 

Watch ASCII Star Wars in Windows XP, Vista and 7


Watch ASCII Star Wars in Windows XP, Vista and 7



Every one of us has watched Star Wars on television, computer or in a theater. It is the same movie with aliens fighting each other for galaxies and such stuff. There is nothing new in it. But wait, have you watched an ASCII( American Standard Code for Information Interchange) version of Star Wars and that too in Windows using telnet.  Well if you have not, then you must do it now!

There is a complete copy of Star Wars done entirely in ASCII characters that you can watch in theWindows operating system (or any OS that supports telnet). The only thing required to watch it is an internet connection; speed does not matter.

To watch it on Windows XP,
  1. Go to Start, Run.
  2. Now type "telnet towel.blinkenlights.nl" without the quotes and press Enter.

On Windows 7 and Windows Vista

Telnet is turned off by default in the latest versions of Windows. So, in order to watch star wars, you must first enable telnet by going to Control Panel › Programs › Turn Windows Feature On or Off and ticking both the telnet check boxes. After doing that, follow the steps given below:-
  1. Go to Start, Search.
  2. Type telnet and press Enter.
  3. In the following command prompt window, type "o" without quotes and press Enter.
  4. Now type "towel.blinkenlights.nl" without the quotes and press Enter.
If you do not need telnet anymore, you can turn it off.
command prompt window like the one in the image will open with the movie being played in it. See the movie yourself. Did you enjoy watching this new version of Star Wars? Well, I did and know it for sure that you would have too.



READMORE