123 Eng

### Engineering the engineers™

Home
Source Codes
Engineering Colleges

Training  Reports
Seminar Reports
Placement Papers

Forums

Computer Science / IT
Electronics
Electrical
Mechanical
Chemical
Civil

CAT / MBA

GMAT / Foreign MBA
Latest Jobs

Displaying  Source Code(s)

 Program to implement Polygon Clipping Algorithm. -------------------------------------------------------------------------------- #include #include #include #include #include #include int pixels[2][4]; float xn1,xn2,yn1,yn2,x3,y3,m; void show_quadrant() { cleardevice(); rectangle(120,40,320,240); rectangle(320,40,520,240); rectangle(120,240,320,440); rectangle(320,240,520,440); for(int i=130;i<=510;i+=10) { if(i==320) continue; outtextxy(i,237,"+"); } for(i=50;i<=430;i+=10) { if(i==240) continue; outtextxy(317,i,"-"); } outtextxy(310,230,"O"); outtextxy(530,240,"X"); outtextxy(320,450,"-Y"); outtextxy(100,240,"-X"); outtextxy(320,30,"Y"); } void midpt(int x1,int y1,int x2,int y2,int xmin,int ymin,int xmax,int ymax) { int fl=1; int pixels[2][4],i,j; for(i=0;i<2;i++) for(j=0;j<4;j++) pixels[i][j]=0; if(y1>ymax) pixels[0][0]=1; if(y1xmax) pixels[0][2]=1; if(x1ymax) pixels[1][0]=1; if(y2xmax) pixels[1][2]=1; if(x2ymax || y1xmax || x1ymax || y3xmax || x3ymax || y2xmax || x2ymax || y3xmax || x3=12;i++,j--) { gotoxy(xx,1); cout<

Contribute content or training reports / feedback / Comments
job placement papers