Saturday 14 September 2013
Computer Graphics Design
<<Source code>>..........
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
int gm=DETECT, gd= DETECT;
clrscr();
initgraph(&gd,&gm,"C:\\turboc3\\bgi");
//creating outer rectangle
line(40,40,360,40);
line(360,40,360,160);
line(360,160,40,160);
line(40,160,40,40);
//creating inner rectangle
line(50,50,350,50);
line(350,50,350,150);
line(50,150,350,150);
line(50,50,50,150);
//sepration lines
line(150,50,150,150);
line(250,50,250,150);
//first column
//+
line(90,100,110,100);
line(100,90,100,110);
line(50,50,90,100);
line(50,50,100,90);
line(50,150,90,100);
line(50,150,100,110);
line(150,50,100,90);
line(150,50,110,100);
line(150,150,100,110);
line(150,150,110,100);
//second column
line(190,100,210,100);
line(200,90,200,110);
line(150,50,190,100);
line(150,50,200,90);
line(150,150,190,100);
line(150,150,200,110);
line(250,50,200,90);
line(250,50,210,100);
line(250,150,200,110);
line(250,150,210,100);
//third column
line(290,100,310,100);
line(300,90,300,110);
line(250,50,290,100);
line(250,50,300,90);
line(250,150,290,100);
line(250,150,300,110);
line(350,50,300,90);
line(350,50,310,100);
line(350,150,300,110);
line(350,150,310,100);
getch();
closegraph();
}
Read More »
Labels:
Computer Graphics
Subscribe to:
Posts (Atom)