#include<math.h>
#include<stdio.h>
#include<graphics.h>
#include<time.h>
#define pi 3.1415926
main()
{int i,j=0,x,y,k=1;
int a=DETECT,b;
initgraph(&a,&b,"d:\\tc");
while(!kbhit())
{j+=10;
for(i=0;i<=2000;i++)
{
x=300+100*cos(2*i*pi/1000)*sin(i*pi/1000+j*pi/1000);
y=240+100*cos(2*i*pi/1000)*cos(i*pi/1000+j*pi/1000);
if(j%500==0) k++;
putpixel(x,y,k);
}
delay(5000);
cleardevice();
}
getch();
closegraph();
}
#include<stdio.h>
#include<graphics.h>
#include<time.h>
#define pi 3.1415926
main()
{int i,j=0,x,y,k=1;
int a=DETECT,b;
initgraph(&a,&b,"d:\\tc");
while(!kbhit())
{j+=10;
for(i=0;i<=2000;i++)
{
x=300+100*cos(2*i*pi/1000)*sin(i*pi/1000+j*pi/1000);
y=240+100*cos(2*i*pi/1000)*cos(i*pi/1000+j*pi/1000);
if(j%500==0) k++;
putpixel(x,y,k);
}
delay(5000);
cleardevice();
}
getch();
closegraph();
}