uses graphABC;
var f:boolean;
procedure planety(r,x,y:integer;c:Color);
begin
setpencolor(c);
setbrushcolor(c);
setbrushstyle(bsSolid);
circle(x,y,r);
end;
procedure KeyPress(key:char);
begin
if key<>#0 then f:=false;
end;
var xc,yc,rs,rz,rl,r1,r2,x1,y1,x2,y2:integer;
u1,u2:real;
begin
xc:=windowwidth div 2;
yc:=windowheight div 2;
rs:=90;
rz:=15;
rl:=3;
r1:=170;
r2:=25;
u1:=0;
u2:=0;
clearwindow(clBlack);
lockdrawing;
onkeypress:=Keypress;
f:=true;
repeat
clearwindow(clBlack);
setbrushstyle(bsClear);
setfontcolor(clWhite);
textout(windowwidth div 2-80,10,'Выход любая клавиша');
planety(rs,xc,yc,clYellow);
u1:=u1-0.02;
u2:=u2+0.1;
x1:=xc+round(r1*cos(u1));
y1:=yc-round(r1*sin(u1));
x2:=x1+round(r2*cos(u2));
y2:=y1-round(r2*sin(u2));
planety(rz,x1,y1,clBlue);
planety(rl,x2,y2,clSilver);
sleep(100);
redraw
until not f
end.