C graphics program to make animated colored lines with the help of multiple circles
















C graphics program to make animated colored lines with the help of multiple circles


#include <graphics.h>
#include <conio.h>
#include <dos.h>

void main()
{

int d;
int m;
int x;
int y;

d=DETECT;

initgraph(&d,&m,"c:\\tc\\bgi");


for(x=10;x<630;x++)
{

for(int r=0;r<8;r++)
{
setcolor(r+3);
delay(1);

circle(x,5,r);

circle(x,25,r);

circle(x,45,r);
circle(x,65,r);
circle(x,85,r);
circle(x,105,r);
circle(x,125,r);
circle(x,145,r);
circle(x,165,r);
circle(x,185,r);
circle(x,205,r);
circle(x,225,r);
circle(x,245,r);
circle(x,265,r);
circle(x,285,r);
circle(x,305,r);
circle(x,325,r);
circle(x,345,r);
circle(x,365,r);
circle(x,385,r);
circle(x,405,r);
circle(x,425,r);
circle(x,445,r);
circle(x,465,r);

}
}



getch();

closegraph();

}

Output :

0 comments:

Post a Comment