procedure TMainFomiFomCreate (Sender TObject); var
I, J, К : Integer; begin
Bl: =False; For i:=l to 36 do For j=l to 36 do
Mass [i, j] :=4; with StringGridl do begin K:=0;
forl:=l to 31 do begin
К :=К+1;
Cells [I,0]:=IntToStr(K); end; К -0;
for I :=lto31do begin
К :=К+1;
Cells [0,1] :=IntToStr(K); end;
k:=0;
for I :=lto31do forJ =1 to 31 do
Cells P,J]-IntToStr(K);
k:=l;
Cells [7,2] : =IntToStr (K);
Cells [13,4]: =IntToStr (K);
Cells [21,4] : = IntToStr (K);
Cells[3,6]: = IntToStr (K);
Cells [15,6] : = IntToStr(K);
Cells [14,8] : = InfToStr(K);
Cells [9,10]: = InfToSlr(K);
Cells [29,10] : = IntToStr(K);
Cells [17,9] : = IntToStr(K);
Cells [16,9] : = IntToStr(K);
Cells [15,10] : = lntToStr(K);
Cells [16,10] : = IntToStr(K);
Cells [17,10] : =IntToSlr(K);
Cells [18,10] : =lntToStr(K);
Cells [14,11] : = JntToStr(K);
Cells [15,11] : = IntToStr(K);
Cells [16,11] : = IntToStr(K);
Cells [17,11] : = IntToStr(K);
Cells [18,11] : =IntToStr (K);
Cells [19,11]: = IntToStr(K);
Cells [7,12] := InrToStr (К);
Cells[13,12]: = InrToStr(K);
Cells [15,12]: = InrToStr (K);
Cells [16,12] : = IntToStr (K);
Cells [17,12] : = IntToSlr(K);
Cells [18,12] : = IntToStr(K);
Cells [19,12] : = IntToStr (K);
Cells [20,12] : = IntToStr(K);
Cells [21,12]: = IntToStr (K);
Cells [12,13] : = IntToStr(K);
Cells [13,13] : = IntToSlr(K);
Cells [14,13] : = IntToStr(K);
Cells [15,13]: = IntToStr (K);
Cells [16.13] : = lnfToSlr(K);
Ceils [17,13] : = lntToStr(K),
Cells [18,13] :=IntToStr(K);
Cells [19,13] : = IntToStr (K);
Cells [11,14] : = IntToSlr(K);
Cells [12,14] : = IntToStr(K);
Cells [13,14] : = IntToStr(K);
Cells [14,14] : = IntToSlr(K);
Cells [15,14] : = IntToStr(K);
Cells [16,14]: = IntToStr (K);
Cells [17,14] : = IntToSlr(K);
Cells [18,14] : = IntToStr (K);
Cells [9,15]: = IntToStr (K);
Cells [10,15]: = IntToStr (K);
Cells [11,15]: = IntToStr (K);
Cells [12,15]: = IntToStr (K);
Cells [13,15]: = IntToStr (K);
Cells [14,15]: = IntToStr (K);
Cells [15,15]: = IntToStr (K);
Cells [16,15]: = IntToStr (K);
Cells [17,15]: = IntToStr (K);
Cells [23,15] : = brfToStr(K);
Cells [10,16] : = IntToStr (K);
Cells [11,16] : = IntToStr (K);
Cells [12,16] : = IntToStr (K);
Cells [13,16] : = IntToStr(K);
Cells [14,16]: = IntToStr (K);
Cells [15,16]: = IntToStr (K);
Cells [16,16]: = IntToStr (K);
Cells [9,17] : = InrToStr (K);
Cells [12,17]: = IntToStr (K);
Cells [13,17]: = IntToStr (K);
Cells [14,17]: = IntToStr (K);
Cells [15,17]: = IntToStr (K);
Cells [10,18] : = IntToStr(K);
Cells [H,18]: = IntToSlr(K);
Celk [12,18]: = IntToStr (K);
Cells [13,18]: = IntToStr (K);
Cells [14,18]: = IntToStr (K);
Cells [8,19] : = IntToStr(K);
Celk [11,19]:=IntToStr (K);
Cells[12,19]: = InfToSlr(K);
Cells [13,19]: = IntToStr (K);
Cells [14,19]: = IntToStr (K);
Cells [12,20]: = IntToStr (K);
Cells [22,20]: = IntToStr (K);
Cells [27,20] : = IntToStr (K);
Cells [5,2З]: = IntToStr (K);
Cells [18,23]: = IntToStr (K);
Cells [24,23] : = IntToSlr(K),
Cells [13,25]: = IntToStr (K);
Cells [29,26]: = IntToStr (K),
Cells [14,27]: = IntToSlr(K);
Cells [16,27]: = IntToSlr(K);
Cells [27,27]:= IntToStr(K);
Cells [2,29] : = IntToSlr(K);
Cells [8,29] : = IntToStr(K);
Cells [10,30] : = IntToStr(K);
Cells [30,30] : = IntToStr (K);
end;
For i:=l to 31 do For j=l to 31 do
Mass [i, j]:=0; end;
procedure TMainForm.StringGridl Click (Sender:TObject);
Procedure Show Mass: Varij:byte; begin
Application. ProcessMessages; Fori:=lto36do Forj:=lto36do begin
If (Mass [L j] = 3) then StringGridl. Cells [i, j] := 'X' else If (Mass [i, j] = 4) then StringGridl.Cells [i, j] :=?'
else StringGridl.Cells [i, j] := IntToStr (Mass [i, j]); end; end;
procedure Stepl; Var Lj: Byte; begin
Fori:=lto31 do For j: = 1 to 31 do
Mass[I,j]:=0; Mass [16,9]:=1;
Mass [17,9]:=1;
Mass [15,10]:=1;
Mass [16,10]:=1;
Mass [17,10]:=1;
Mass[18,10]:=1;
Mass [14,11]:=1;
Mass [15,11]:=1;
Mass [16,11]:=1;
Mass [17,11]:=1;
Mass [18,11]:=1;
Mass [19,11]:=1;
Mass [12,12]:=1;
Mass [13,12]:=1;
Mass [14,12]:=1;
Mass [15,12]:=1;
Mass [16,12]:=1;
Mass [17,12]:=1;
Mass [18,12]:=1;
Mass [19,12]:=1;
Mass [20,12]:=1;
Mass [11,13]:=1;
Mass [12,13]:=1;
Mass [13,13]:=1;
Mass [14,13]:=1;
Mass [15,13]:=1;
Mass [16,13]:=1;
Mass [17,13]:=1;
Mass [18,13]:=1;
Mass [19,13]:=1;
Mass [11,14]:=1;
Mass [12,14]:=1;
Mass [13,14]:=1;
Mass 14,14]:=1;
Mass [15,14]:=1;
Mass [16,14]:=1;
Mass [17,14]:=1;
Mass [18,14]:=1;
Mass [10,15]:=1;
Mass [11,15]:=1;
Mass [12,15]:=1;
Mass [13,15]:=1;
Mass [14,15]:=1;
Mass [15,15]:=1;
Mass [16,15]:=1;
Mass [17,15]:=1;
Mass [9,16]:=1;
Mass [10,16]:=1;
Mass [11,16]:=1;
Mass [12,16]:=1;
Mass [13,16]:=1;
Mass [14,16]:=1;
Mass [15,16] :=1;
Mass [16,16]:=1;
Mass [9,17]:=1;
Mass [10,17]:=1;
Mass [11,17]:=1;
Mass [12,17]:=1;
Mass [13,17] :=1;
Mass [14,17]:=1;
Mass [15,17]:=1;
Mass [10,18]:=1;
Mass [11,18]:=1;
Mass [12,18]:=1;
Mass [13,18]:=1;
Mass [14,18]:=1;
Mass [11,19]:=1;
Mass [12,19]:=1;
Mass [13,19]:=1;
Mass [12,20]:=1; ShowMass;
end;
procedure StepX; Var i,j:Byte;
begin
For i:=l to 31 do
For j:=l to 31do
If Mass [i, j]=3 then StringGridl.Cells [i, 0]:= 'X'; ShowMass;
end;
procedure Step2; begin
Mass[16,9]:=3;
Mass[16,10]:=3;
Mass[16,ll]:=3;
Mass[16,12]:=3;
Mass[16,13]:=3;
Mass[15,14]:=3;
Mass[14,15]:=3;
Mass[13.16]:=3;
Mass[12,17]:=3;
Mass[12,18]:=3;
Mass[12,19]:=3;
Mass[12.20]:=3;
StepX;
end;
procedure Step31;
Var i,j,k,l,:Byte;
Begin
For i:=l to31do
For j :=33 to 36 do
For i:=33 to 36 do For j:=1 to 31 do
Mass[i,j]:=0; For i:=l to31 do
For j :=1 to 31 do
If Mass [I,j]>0 then begin
Mass[i,33]:=l; Mass[i,34]:=l;
end;
For i:=l to31do
For j:=l to31 do
If Mass [i,j]>0 then begin
Mass[33,j]:=l;
Mass[34,j]:=l;
end;
end;
procedureStep32; Var i, j, k, l: Byte; begin
For i:=l to 31 do
if Mass [33, i]=1 then begin
Mass[34,i]:=0;
Break;
end;
For i:=15 to31do
if Mass [i, 33] =0 then
begin
Mass[i-l,34]:=0;
Break;
end;
K:=0;
l:=0;
For i:=1 to31do
if Mass[34,i]=l then
begin
inc(k);
l:=I;
end;
k:=Round (k/2); l:=l-k+l;
Mass [1,35]:=l;
K:=0;
l:=0;
For i:=1 to31do
if Mass [i, 34] =1 then begin
inc(k);
l:=i;
end;
k:=Round(k/2);
l:=l-k+l;
Mass [1,35] :=1;
ShowMass ;
end;
Procedure Step4; Var i,j :Byte; begin
Forml.ListBoxl.Items.Add(‘Начинаемрасчёт’)
For i:=l to31do
For j:=1 to31 do
Mass[i,j]:=0;
For i:=14 to 18 do
For j:=11 to 21 do
Mass[i,j] :=1; For i:=11 to 21 do
Mass[16,i] :=3;
Form1. ListBox1. Items. Add ('Очистка от помех");
Form1. ListBox1. Items. Add ('Построение проекции");
Form1. ListBox1. Items. Add ('Нахождение центра проекции');
Form1. ListBox1. Items. Add ('Расчетокончен');
Step31;
StepX;
Mass [16,35 ]:=1;
Mass [35,16] :=1;
ShowMass;
end;
begin
If Bl then
begin
Step4;
Bl:=False;
Exit;
end
else Bl:=True;
Form1.ListBox1.Items. Add ('Начинаемрасчет'); Step1;
Form1.ListBox1.Items. Add ('Очисткаотпомех'); Step2;
Form1.ListBox1.Items.Add ('Построениепроекции'); Step31;
Step32;
Form1.ListBox1.Items.Add ('Нахождениецентрапроекции"); Form1.ListBox1.Items.Add ('Расчетокончен');
end;
end.
Unit Until;
interface uses
Windows, Messages, SysLftils, Classes, Graphics, Controls,
Forms, Dialogs, StdCtrls, Buttons;
type
TForml = class (TForm)
ListBox1:TlistBox;
BitBtn1:TBitBtn;
procedure BitBtn1Click (Sende: TObject); private
{Private declarations}
public
{Public declarations}
end;
var
Form1:TForm1; implementation uses Unit2;
{$R*.DFM}
Procedure TForm1.BitBtn1Click (Sender: TObject); begin
AboutBox.ShowModal;
end;
end.
unit Unit2; interface uses
Windows, SysUtils, Classes, Graphics, Forms, Controls,
StdCtrls, Buttons, ExtCtrls;
type
TAboutBox = class (TForm)
Pane1: TPanel;
ProgramIcon: TImage;
ProductName: TLabel;
Version: TLabel;
Copyright: TLabel;
Comments: TLabel;
OKButton: TButton; private
{Private declarations} public
{Public declarations}
end;
var
AboutBox: TAboutBox; implementation
{$R*.DFM}
end.