//Animation showing attack on uranium
#include<graphics.h>
#include<conio.h>
void main()
{
int gd=DETECT,gm,midx,midy,i;
initgraph(&gd,&gm,"C:\\TurboC3\\BGI");
midx=getmaxx()/2;midy=getmaxy()/2;
for(i=0;i<=245;i++)
{
//Central Red Circle
setcolor(RED);
circle(midx,midy,20);
setfillstyle(SOLID_FILL,RED);
floodfill(midx,midy,RED);
//Left Yellow Circle
setcolor(YELLOW);
circle(midx-250+i,midy,10);
setfillstyle(SOLID_FILL,YELLOW);
floodfill(midx-250+i,midy,YELLOW);
if(i==245)
break;
clearviewport();
}
for(i=0;i<=245;i++)
{
//Central Red Circle
setcolor(RED);
circle(midx,midy,20);
setfillstyle(SOLID_FILL,RED);
floodfill(midx,midy,RED);
//Left Yellow Circle
setcolor(GREEN);
circle(midx+i,midy,10);
setfillstyle(SOLID_FILL,GREEN);
floodfill(midx+i,midy,GREEN);
setcolor(GREEN);
circle(midx+i,midy+i,10);
setfillstyle(SOLID_FILL,GREEN);
floodfill(midx+i,midy+i,GREEN);
setcolor(GREEN);
circle(midx+i,midy-i,10);
setfillstyle(SOLID_FILL,GREEN);
floodfill(midx+i,midy-i,GREEN);
if(i==200)
break;
clearviewport();
}
getch();
closegraph();
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.