procedure zimet_rinkis(r:integer);
var
x,y,p,x1,y1:integer;
const
x_centrs=140;
y_centrs=140;
begin
x:=0;
y:=r;
p:=1-r;
while y>x do
begin
if p<0 then
begin
x:=x+1;
y:=y;
p:=p+2*x+1;
end
else
begin
x:=x+1;
y:=y-1;
p:=p+2*x+1-2*y;
end;
Form1.Canvas.Pixels[x_centrs+x,y_centrs+y]:=CLBLACK;
Form1.Canvas.Pixels[y_centrs+y,x_centrs+x]:=CLBLACK;
Form1.Canvas.Pixels[x_centrs-x,y_centrs+y]:=CLBLACK;
Form1.Canvas.Pixels[y_centrs-y,x_centrs+x]:=CLBLACK;
Form1.Canvas.Pixels[x_centrs+x,y_centrs-y]:=CLBLACK;
Form1.Canvas.Pixels[y_centrs+y,x_centrs-x]:=CLBLACK;
Form1.Canvas.Pixels[x_centrs-x,y_centrs-y]:=CLBLACK;
Form1.Canvas.Pixels[y_centrs-y,x_centrs-x]:=CLBLACK;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
r:integer;
begin
r:=StrToInt(Edit1.text);
zimet_rinkis(r);
end;
end.
…