uses graph,crt; const big_r=100; big_col=YELLOW; small_r=50; small_col=GREEN; step=0.001; var gd,gm,x,y:integer; alp:real; begin gd:=DETECT; gm:=DETECT; initgraph(gd,gm,''); gd:=graphresult; if(gd<>grOk)then begin writeln('Error ',gd,#13#10,grapherrormsg(gd),#13#10'Press any key...'); readkey; halt(1); end; setcolor(big_col); gd:=getmaxx shr 1; gm:=getmaxy shr 1; circle(gd,gm,big_r); repeat setcolor(BLACK); circle(x,y,small_r); x:=gd+round((2+small_r+big_r)*cos(alp)); y:=gm+round((2+small_r+big_r)*sin(alp)); setcolor(small_col); circle(x,y,small_r); alp:=alp+step; delay(100); until keypressed; closegraph; end. |