uses
  Crt, Graph;

const
  x0 = 320;
  y0 = 240;
  r = 3;
  a = 200;

procedure init;
var
  gd, gm : integer;
begin
  gd := Detect;
  InitGraph(gd, gm, '');
end;

function p(f, a : real) : real;
begin
  p := -a*cos(2*f)/cos(f);
end;

function x(f, a : real) : integer;
begin
  x := round(p(f,a)*cos(f+pi/2));
end;

function y(f, a : real) : integer;
begin
  y := round(p(f,a)*sin(f+pi/2));
end;

var
  f, df : real;

begin
  init;
  f := -pi/2+2*df;
  df := pi/(2*360);
  while f<pi/2 do
    begin
      SetColor(15);
      SetFillStyle(1,15);
      PiesLice(x0+x(f,a),y0+y(f,a),0,360,r);
      delay(10);
      SetColor(0);
      SetFillStyle(0,0);
      PiesLice(x0+x(f,a),y0+y(f,a),0,360,r);
      f := f+df;
    end;
  readln;
  CloseGraph;
end.