#include #include #include #include void main() { int GraphDriver; /* The Graphics device driver */ int GraphMode; /* The Graphics mode value */ struct point { int x,y; } p1,p2; char aa; int k,i,m,n,j; float x,y,rad=3.14159/180; printf("give me the circle point--->"); scanf("%d %d",&p1.x,&p1.y); printf("give me the k --->"); scanf("%d",&k); printf("give me the no. of fan --->"); scanf("%d",&n); getche(); j=1; GraphDriver = DETECT; /* Request auto-detection */ initgraph( &GraphDriver, &GraphMode, "" ); /* just increasing p1 - p2 */ while (1) { m=k; while (m > 30) { for (i=0; i<=360; i++) { x=p1.x+m*cos(n*i*rad)*cos(i*rad); y=p1.y+m*cos(n*i*rad)*sin(i*rad); if (i == 0) moveto(x,y); else lineto(x,y); } m-=20; setcolor((j++)%16+1); } delay(50); while ((aa=kbhit()) != 0) break; if (aa != 0) break; } getche(); closegraph(); /* Return the system to text mode */ }