// written in Borland CPP ver 3.1
// for graphics programs set options windows:
// options -> linker -> libraries -> [x] graphics library
#include <conio.h>
#include <dos.h>
#include <graphics.h>
#include <math.h>
#define xo 320
#define yo 240
#define r 200
#define PI 3.14159
void Init()
{
int driver,mode;
detectgraph(&driver,&mode);
initgraph(&driver,&mode,"d:\\borlandc\\bgi");
} // INIT
void Process()
{
float alpha = 0;
int x1 = xo + r*cos(alpha),
y1 = yo + r*sin(alpha);
setcolor(YELLOW);
setwritemode(1);
while(!kbhit())
{
line(xo,yo,x1,y1);
delay(300);
line(xo,yo,x1,y1);
alpha += PI/24;
x1 = xo + r*cos(alpha);
y1 = yo + r*sin(alpha);
}
} // DRAW WHEEL
void main()
{
Init();
for(int i = 30;i <= r;i += 10)
{
setcolor(i % 7 + 1);
circle(xo,yo,i);
}
Process();
closegraph();
} // MAIN