Реферат: Исследование и моделирование с помощью компьютера электрических полей
While (X>0) and (Y>0) and (X<Form1.Width) and (Y<Form1.Height) do begin
Vx:=0; Vy:=0;
For I:=1 to Nc do begin
Dx:=Qrc[I,1]-X;
Dy:=Qrc[I,2]-Y;
Deg:=Sqrt(Dx*Dx+Dy*Dy);
If (Deg<Abs(Qrc[I,3])*3) then Exit;
Deg:=Deg*Deg*Deg;
Vx:=Vx+(K*Qrc[I,3]*Dx/Deg);
Vy:=Vy+(K*Qrc[I,3]*Dy/Deg);
end;
U:=1;
If Sqrt(Vx*Vx+Vy*Vy)<>0 then U:=1/Sqrt(Vx*Vx+Vy*Vy);
Vx:=U*Vx; Vy:=U*Vy;
Form1.Image1.Canvas.MoveTo(Round(X),Round(Y));
X:=X+Vx; Y:=Y+Vy;
For I:=0 to Num-1 do If (Last[I,1]=Round(X)) and (Last[I,2]=Round(Y)) and (I<Num-3) then Exit;
Inc(Num); SetLength(Last,Num);
Last[Num-1,1]:=Round(X); Last[Num-1,2]:=Round(Y);
Form1.Image1.Canvas.LineTo(Round(X),Round(Y));
If Stop<>0 then If Abs(Xb-X)>Stop then Exit;
End;
SetLength(Last,0);
End;
Procedure ElRefresh;
Var I:Integer;
Begin
Form1.Image1.Canvas.Pen.Color:=clWhite;
For I:=1 to Nc do begin