Wednesday, 26 October 2011

Computer Graphics



Computer Graphics is always a growing branch of computers, where every day new inventions are made and the main aim is to make a best output as it was never before. All this is programming itself, a program that determines the graphic properties along with the hardware that manages with the program and thus making it successful at the end. Here is a simple program to move two different circles in opposite directions using a simple C program.

#include<graphics.h>
#include<conio.h>
#include<dos.h>
Void main()
{
int gd=DETECT,gm,y,x;
initgraph(&gd,&gm,”D:\\TURBOC3”);
for(x=0,y=get maxx(); x<=get maxx(); y--,x++)
{
setcolor (WHITE);
circle (x,240,60);
circle (y,240,60);
delay (10);
setcolor (BLACK);
circle(x,240,60);
circle(y,240,60);
}
getch();
}

Henceforth, check this out and this is the basic programming that is done to make any of the complex graphics and these graphics today make your lives more digital and colorful.



0 comments:

Post a Comment