#include<graphics.h>
#include<math.h>
#include<complex.h>
#include<conio.h>
#include<dos.h>
void main()
{
int NUM;
int X=300,Y=250,R=1,XX=0,YY=0,ANGLE=0;
int DRIVER=DETECT,MODE;
//registerbgidriver(EGAVGA_driver);
initgraph(&DRIVER,&MODE,"");
cleardevice();
settextjustify(0,0);
settextstyle(0,0,1);
setcolor(RED);
outtextxy(5,472,"Press C to continue...");
setcolor(BLUE);
outtextxy(400,472,"press ANYKEY Exit...");
while(getch()=='c'){
for(int i=480;i>250;i--)
{ YY=i;
XX=300;
putpixel(XX,YY,WHITE);
putpixel(XX,YY+1,RED);
putpixel(XX,YY+2,RED);
delay(10);
putpixel(XX,YY,BLACK);
putpixel(XX,YY+1,BLUE);
putpixel(XX,YY+2,BLUE);
}
for(NUM=0;NUM<300;NUM++)
{
XX=X+R*cos(ANGLE);
YY=Y+R*sin(ANGLE);
int color=0;
color=ANGLE;
if(ANGLE%15==0)
color=0;
putpixel(XX,YY,color);
ANGLE+=1;
R++;
delay(10);
}
for(NUM=0;NUM<300;NUM++)
{
XX=X+R*cos(ANGLE);
YY=Y+R*sin(ANGLE);
putpixel(XX,YY,BLACK);
ANGLE-=1;
R--;
delay(5);
}
}
settextjustify(1,1);
settextstyle(0,0,2);
outtextxy(300,214,"OVER!");
outtextxy(300,240,"Anykey Exit...");
getch();
closegraph();
}