Реферат: Исследование и моделирование с помощью компьютера электрических полей
Form1.Image1.Repaint;
end;
For I:=1 to Nc do If Qrc[I,3]>0 then begin
If Qrc[I,3]=1 then For P:=1 to Z do ElTrack(Qrc[I,1]+3*Cos(((P-1)*360/Z)*Pi/180),Qrc[I,2]+3*Sin(((P-1)*360/Z)*Pi/180),I,-1);
If Qrc[I,3]=2 then For P:=1 to 2*Z do ElTrack(Qrc[I,1]+3*Cos(((P-1)*180/Z)*Pi/180),Qrc[I,2]+3*Sin(((P-1)*180/Z)*Pi/180),I,-1);
If Qrc[I,3]=4 then For P:=1 to 4*Z do ElTrack(Qrc[I,1]+3*Cos(((P-1)*90/Z)*Pi/180),Qrc[I,2]+3*Sin(((P-1)*90/Z)*Pi/180),I,-1);
Form1.Image1.Repaint;
end;
ElRefresh;
E:=DateTimeToTimeStamp(Now).Time;
Form1.StatusBar1.Panels.Items[4].Text:='Готово...';
Form1.StatusBar1.Panels.Items[3].Text:=FloatToStr((E-B)/1000)+' сек';
End;
Procedure Prepare;
Var I,P,Q:SmallInt;
Begin
Form1.Image1.Align:=alClient;
Form1.Image1.Canvas.Brush.Color:=clBlack;
Form1.Image1.Canvas.FillRect(Rect(0,0,Form1.Image1.Width,Form1.Image1.Height));
For I:=1 to Nc do For P:=1 to 3 do Qrc[I,P]:=0; Nc:=0;
For I:=0 to 63 do For P:=0 to 47 do
If Qc[I,P]<>0 then begin
Inc(Nc);
Qrc[Nc,1]:=I*25+13;
Qrc[Nc,2]:=P*25+13;
Q:=Abs(Qc[I,P])-1;
Q:=Round(Exp(Q*Ln(2)));
If Qc[I,P]<0 then Q:=-Q;
Qrc[Nc,3]:=Q;