Program Grupul_radacinilor_din_unitate;
uses crt, graph, dos;
var
 gd,gm:integer;
 cx,cy,ex,ey,r,o,s,ls,i:word;
 i2, cl, k, inter:real;

begin
clrscr;
gd:=Detect;
initGraph(gd,gm,'');
 ex:=getmaxx div 2;
 ey:=getmaxy div 2;
 r:=(ex+ey) div 3;
 inter:=0.01;  i2:=inter;
 k:=0;
 o:=1;
 GetTime(cx,cy,s,i);ls:=s+15;
repeat
 GetTime(cx,cy,s,i);
 cx:=ex+round(r*cos(k)/2);
 cy:=ey+round(r*sin(k)/2);
for i:=0 to (o-1)  do begin
 setcolor(trunc(k+i*$ffff/o));
 line(cx,cy,cx+round(r*cos(2*pi*i/o+k)),cy+round(r*sin(2*pi*i/o+k)));
// Circle(cx,cy,r);
end;
k:=k+i2;
if (ls+60-s)mod 60<1 then begin
 inc(o); I2:=Inter*(o);
 ls:=(s+13)mod 60;
end;
if keypressed then begin
 case readkey of
  #72:inc(o);  #80:dec(o);
  #27:begin closeGraph; halt;end;
 end;
 if o=0 then o:=1;
 I2:=Inter*o;
end;
until false;
end.