Автор работы: Пользователь скрыл имя, 06 Ноября 2012 в 22:59, реферат
Электрическое поле – особый вид материи, создаваемый электрическими зарядами, основное свойство которого заключается в действии на другие электрические заряды.
ЭЛЕКТРИЧЕСКОЕ ПОЛЕ 2
КУЛОНОВСКАЯ СИЛА 2
ПОНЯТИЕ О КУЛОНОВСКОЙ СИЛЕ 2
КУЛОНОВСКИЕ СИЛЫ В СИСТЕМЕ ЗАРЯДОВ. ПРИНЦИП СУПЕРПОЗИЦИИ. 2
НАПРЯЖЕННОСТЬ 3
НАПРЯЖЕННОСТЬ КАК ФИЗИЧЕСКАЯ ВЕЛИЧИНА 3
ЛИНИИ НАПРЯЖЕННОСТИ 3
РАБОТА КУЛОНОВСКИХ СИЛ В ЭЛЕКТРИЧЕСКОМ ПОЛЕ. ПОТЕНЦИАЛ. 4
ПОТЕНЦИАЛЬНАЯ ЭНЕРГИЯ ЗАРЯДОВ 4
РАБОТА КУЛОНОВСКИХ СИЛ ПО ЗАМКНУТОМУ КОНТУРУ 4
ПОТЕНЦИАЛ КАК ФИЗИЧЕСКАЯ ВЕЛИЧИНА 4
РАЗНОСТЬ ПОТЕНЦИАЛОВ 5
ЭКВИПОТЕНЦИАЛЬНЫЕ ПОВЕРХНОСТИ 5
КОМПЬЮТЕРНОЕ МОДЕЛИРОВАНИЕ 5
МОДЕЛИРОВАНИЕ СИЛОВЫХ ЛИНИЙ 5
МОДЕЛИРОВАНИЕ ЭКВИПОТЕНЦИАЛЬНЫХ ЛИНИЙ 6
ВОЗМОЖНОСТИ ПРОГРАММЫ 6
СПИСОК ИСПОЛЬЗУЕМОЙ ЛИТЕРАТУРЫ 7
unit Main;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Menus, ComCtrls, ExtCtrls, ImgList, Math, StdCtrls;
type
TForm1 = class(TForm)
MainMenu1: TMainMenu;
N1, N2, N3, N4, N5, N6, N7, N8, N9, N10, N11, N12, N13, N14, N15, N16, N17, N18, N19, N20, N21, N23 : TMenuItem;
StatusBar1: TStatusBar;
OpenDialog1: TOpenDialog;
SaveDialog1: TSaveDialog;
Image1: TImage;
Memo1: TMemo;
procedure FormResize(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormMouseDown(Sender: TObject; Button: TMouseButton;Shift: TShiftState; X, Y: Integer);
procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X,Y: Integer);
procedure FormKeyPress(Sender: TObject; var Key: Char);
procedure N6Click(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure N8Click(Sender: TObject);
procedure N7Click(Sender: TObject);
procedure N12Click(Sender: TObject);
procedure N13Click(Sender: TObject);
procedure Image1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure Image1MouseMove(Sender: TObject; Shift: TShiftState; X,Y: Integer);
procedure N9Click(Sender: TObject);
procedure N10Click(Sender: TObject);
procedure N11Click(Sender: TObject);
procedure N16Click(Sender: TObject);
procedure N19Click(Sender: TObject);
procedure N20Click(Sender: TObject);
procedure N14Click(Sender: TObject);
private
public
end;
Procedure DrawGrid;
Procedure RefreshSquare(X,Y:Byte);
Procedure Circle(X,Y,R:Real;W:Byte);
Procedure RefreshStatus(X,Y:Byte);
Procedure ElTrack(X,Y:Real;B,K:Integer);
Procedure ElTrackForMoving(X,Y:Real;K:
Procedure ElRefresh;
Procedure Prepare;
Procedure Stop;
Procedure Redactor;
Procedure PaintLines;
Function CheckEkviBegin(X,Y:Integer):
Function Potenc(X,Y:Integer):Real;
type Matrix=Array[0..63,0..47] of ShortInt;
type Position=Record
X:Integer;
Y:Integer;
end;
var
Form1: TForm1;
En:Array[0..9] of Position;
Z,EnNow:ShortInt;
Qc : Matrix;
Qrc: Array [1..3071,1..3] of SmallInt;
Last,LastEkv:Array of Array [1..2] of SmallInt;
Ekv: Array[-1600..1600,-1200..1200] of Boolean;
Nc:SmallInt;
EkX,EkY,A:Integer;
F : File of Matrix;
Xxl,CalcA,EkviExpl,LineExpl:
Xm,Ym,LastSin:Real;
E0:Array of Position;
implementation
uses Option, Calc, About;
{$R *.DFM}
Procedure DrawGrid;
Var I:Integer;
Begin
Form1.Canvas.Pen.Color:=
While (I<=Form1.Width) and (I<1601) do begin
Form1.Canvas.MoveTo(I,0);
Form1.Canvas.LineTo(I,Form1.
Inc(I,25);
end; I:=0;
While (I<=Form1.Height) and (I<1201) do begin
Form1.Canvas.MoveTo(0,I);
Form1.Canvas.LineTo(Form1.
Inc(I,25);
end;
End;
Procedure RefreshSquare(X,Y:Byte);
Begin
Form1.Canvas.Pen.Color:=
Form1.Canvas.Brush.Color:=
RefreshStatus(X,Y);
If Qc[X,Y]=0 then Exit;
Form1.Canvas.Pen.Color:=
If Qc[X,Y]>0 then Form1.Canvas.Brush.Color:=
else Form1.Canvas.Brush.Color:=
Circle(X*25+13,Y*25+13,Abs(4*
End;
Procedure Circle(X,Y,R:Real;W:Byte);
Begin
If W=0 then Form1.Canvas.Ellipse(Round(X-
If W=1 then Form1.Image1.Canvas.Ellipse(
End;
Procedure RefreshStatus(X,Y:Byte);
Var Q:Integer;
St:String;
Begin
Form1.StatusBar1.Panels.Items[
Form1.StatusBar1.Panels.Items[
Form1.StatusBar1.Panels.Items[
If Qc[X,Y]=0 then Exit;
Q:=Abs(Qc[X,Y])-1;
Q:=Round(Exp(Q*Ln(2)));
If Qc[X,Y]<0 then Q:=-Q;
St:='X = '+IntToStr(X*25+13)+'('+
St:='Y = '+IntToStr(Y*25+13)+'('+
St:='Q = '+IntToStr(Q)+'q';
End;
Procedure PaintLines;
Var I,P:Integer;
B,E:LongWord;
Begin
B:=DateTimeToTimeStamp(Now).
Form1.StatusBar1.Panels.Items[
Prepare;
ElRefresh;
Form1.Image1.Repaint;
Form1.Image1.Canvas.Pen.Color:
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)*
If Qrc[I,3]=-2 then For P:=1 to 2*Z do ElTrack(Qrc[I,1]+3*Cos(((P-1)*
If Qrc[I,3]=-4 then For P:=1 to 4*Z do ElTrack(Qrc[I,1]+3*Cos(((P-1)*
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)*
If Qrc[I,3]=2 then For P:=1 to 2*Z do ElTrack(Qrc[I,1]+3*Cos(((P-1)*
If Qrc[I,3]=4 then For P:=1 to 4*Z do ElTrack(Qrc[I,1]+3*Cos(((P-1)*
Form1.Image1.Repaint;
end;
ElRefresh;
E:=DateTimeToTimeStamp(Now).
Form1.StatusBar1.Panels.Items[
Form1.StatusBar1.Panels.Items[
End;
Procedure Prepare;
Var I,P,Q:SmallInt;
Begin
Form1.Image1.Align:=alClient;
Form1.Image1.Canvas.Brush.
Form1.Image1.Canvas.FillRect(
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;
end;
End;
Procedure ElTrack(X,Y:Real;B,K:Integer);
Var U,Vx,Vy,Dx,Dy,Deg:Real;
I,P,Num:Integer;
Br,Alr:Boolean;
Begin
Num:=0; Br:=False; Alr:=False;
SetLength(Last,0);
While (X>0) and (Y>0) and (X<Form1.Width) and (Y<Form1.Height) do begin
Vx:=0; Vy:=0; Deg:=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<3) and (I<>B) then Break;
Deg:=Deg*Deg*Deg;
Vx:=Vx+(K*Qrc[I,3]*Dx/Deg);
Vy:=Vy+(K*Qrc[I,3]*Dy/Deg);
end;
If (Deg<3) and (I<>B) then Break;
U:=1; If Sqrt(Vx*Vx+Vy*Vy)=0 then Break;
If Sqrt(Vx*Vx+Vy*Vy)<>0 then U:=1/Sqrt(Vx*Vx+Vy*Vy);
Vx:=U*Vx; Vy:=U*Vy; 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 begin
If Form2.RadioButton3.Checked=
If Form2.CheckBox1.Checked=True then begin
For P:=0 to Length(E0)-1 do
If (Abs(Round(X)-E0[P].X)<=1) and (Abs(Round(Y)-E0[P].Y)<=1) then begin
Alr:=True; Break; end;
If Alr=False then begin
with Form1.Image1.Canvas do begin
Brush.Style:=bsClear; Pen.Color:=clYellow;
Ellipse(Round(X-5),Round(Y-5),
Font.Color:=clYellow;
TextOut(Round(X-8),Round(Y+6),
Pen.Color:=clSilver;
end;
SetLength(E0,Length(E0)+1);
E0[Length(E0)-1].X:=Round(X); E0[Length(E0)-1].Y:=Round(Y);
end;
end;
Br:=True;
If Form2.RadioButton4.Checked=
end;
If Br=True then Break;
Inc(Num); SetLength(Last,Num);
Last[Num-1,1]:=Round(X); Last[Num-1,2]:=Round(Y);
End;
If (Br=True) and (Form2.CheckBox2.Checked=True)
and (Form2.RadioButton4.Checked=
Form1.Image1.Canvas.Pen.Color:
For I:=1 to Num-2 do begin
Form1.Image1.Canvas.MoveTo(
Form1.Image1.Canvas.LineTo(
end;
End;
Procedure ElTrackForMoving(X,Y:Real;K:In
Var Xb,U,Vx,Vy,Dx,Dy,Deg:Real;
Num,I:Integer;
Begin
Num:=0; Xb:=X;
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(
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(
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:
For I:=1 to Nc do begin
If Qrc[I,3]>0 then Form1.Image1.Canvas.Brush.
If Abs(Qrc[I,3])<>4 then Circle(Qrc[I,1],Qrc[I,2],Abs(
Circle(Qrc[I,1],Qrc[I,2],11,1)
end;
End;
Procedure Stop;
Begin
LineExpl:=False; EkviExpl:=False;
SetLength(E0,0);
Form1.StatusBar1.Panels.Items[
Form1.StatusBar1.Panels.Items[
Form1.StatusBar1.Panels.Items[
End;
Procedure Redactor;
Var I,P:SmallInt;
Begin
If Form1.StatusBar1.Panels.Items[
Form1.Image1.Align:=alNone;
Form1.Image1.Height:=0; Form1.Image1.Width:=0;
Form1.Refresh; DrawGrid;
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 RefreshSquare(I,P);
Form1.StatusBar1.Panels.Items[
End;
Function Potenc(X,Y:Integer):Real;
Var I:Integer;
Tmp,Dist:Real;
Begin
Tmp:=0;
For I:=1 to Nc do begin
Dist:=Sqrt(((Qrc[I,1]-X)*(Qrc[
If Dist<>0 then Tmp:=Tmp+(Qrc[I,3]/Dist) else begin Potenc:=0; Exit; end;
end;
Potenc:=Tmp;
End;
Function RealPotenc(X,Y:Integer):Real;
Var I:Integer;
Dx,Dy,Tmp,Dist:Real;
Begin
Tmp:=0;
For I:=1 to Nc do begin
Dx:=(Qrc[I,1]-X)/25*
Dy:=(Qrc[I,2]-Y)/25*StrToFloat
Dist:=Sqrt(Dx*Dx+Dy*Dy);
If Dist<>0 then Tmp:=Tmp+(Qrc[I,3]*StrToFloat(
end;
RealPotenc:=Tmp/StrToFloat(
End;
Function CheckEkviBegin(X,Y:Integer):
Begin
CheckEkviBegin:=False;
If (X-1=EkX) and ((Y-1=EkY) or (Y=EkY) or (Y+1=EkY)) then CheckEkviBegin:=True;
If (X+1=EkX) and ((Y-1=EkY) or (Y=EkY) or (Y+1=EkY)) then CheckEkviBegin:=True;
If (X=EkX) and ((Y-1=EkY) or (Y+1=EkY)) then CheckEkviBegin:=True;
End;
Procedure PaintEkvi(X,Y:Integer;Pot:
Var P:Array[1..4] of Real;
M:Array[1..4] of Boolean;
Xt,Yt:Integer;
I,Min:Byte;
Begin
For I:=1 to 4 do P[I]:=0; For I:=1 to 4 do M[I]:=True;
P[1]:=Abs(Pot-Potenc(X,Y-1)); P[2]:=Abs(Pot-Potenc(X+1,Y));
P[3]:=Abs(Pot-Potenc(X,Y+1)); P[4]:=Abs(Pot-Potenc(X-1,Y));
If Potenc(X,Y-1)=0 then Exit;
If Potenc(X,Y+1)=0 then Exit;
If Potenc(X+1,Y)=0 then Exit;
If Potenc(X-1,Y)=0 then Exit;
If O=1 then begin Ekv[X+1,Y+1]:=True; Ekv[X-1,Y+1]:=True; end;
If O=2 then begin Ekv[X-1,Y-1]:=True; Ekv[X-1,Y+1]:=True; end;
If O=3 then begin Ekv[X+1,Y-1]:=True; Ekv[X-1,Y-1]:=True; end;
If O=4 then begin Ekv[X+1,Y-1]:=True; Ekv[X+1,Y+1]:=True; end;
If O=1 then begin En[EnNow].X:=X+1; En[EnNow].Y:=Y+1; En[EnNow+1].X:=X-1; En[EnNow+1].Y:=Y+1; end;
If O=2 then begin En[EnNow].X:=X-1; En[EnNow].Y:=Y-1; En[EnNow+1].X:=X-1; En[EnNow+1].Y:=Y+1; end;
If O=3 then begin En[EnNow].X:=X+1; En[EnNow].Y:=Y-1; En[EnNow+1].X:=X-1; En[EnNow+1].Y:=Y-1; end;
If O=4 then begin En[EnNow].X:=X+1; En[EnNow].Y:=Y-1; En[EnNow+1].X:=X+1; En[EnNow+1].Y:=Y+1; end;
Inc(EnNow,2); If EnNow>=9 then EnNow:=EnNow-9;
Ekv[En[EnNow].X,En[EnNow].Y]:=
Ekv[En[EnNow+1].X,En[EnNow+1].
Xt:=X; Yt:=Y; Min:=1;
While Min<9 do begin
Min:=1; While (M[Min]=False) and (Min<5) do Min:=Min+1;
For I:=1 to 4 do If (P[I]<P[Min]) and (M[I]=True) then Min:=I;
Xt:=X; Yt:=Y;
Case Min of
1: Yt:=Y-1;
2: Xt:=X+1;
3: Yt:=Y+1;
4: Xt:=X-1;
end;
If Ekv[Xt,Yt]=False then Break;
If (Xt=EkX) and (Yt=EkY) and (A>2) then Break;
M[Min]:=False;
If (M[1]=False) and(M[2]=False) and(M[3]=False) and(M[4]=False) then Break;
end;
Form1.Image1.Canvas.MoveTo(X,
X:=Xt; Y:=Yt; Ekv[X,Y]:=True;
Form1.Image1.Canvas.LineTo(X,
Inc(A); If A>1000 then A:=5;
If (X>1000) or (Y>1000) or (X<-1000) or (Y<-1000) then Exit;{begin
PaintEkvi(EkX-1,EkY-1,Potenc(
end;}
If (Xt=EkX) and (Yt=EkY) and (A>2) then Exit;
PaintEkvi(X,Y,Pot,Min);
End;
procedure TForm1.FormResize(Sender: TObject);
Var I,P:SmallInt;
begin
If Xxl=False then Exit;
If Form1.StatusBar1.Panels.Items[
DrawGrid;
For I:=0 to 63 do For P:=0 to 47 do RefreshSquare(I,P);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Form1.StatusBar1.Panels.Items[
Form1.WindowState:=
DrawGrid;
end;
procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
Var Xq,Yq:Byte;
begin
Xq:=X div 25;
Yq:=Y div 25;
RefreshStatus(Xq,Yq);
If Button=mbLeft then If Qc[Xq,Yq]<3 then Inc(Qc[Xq,Yq]);
If Button=mbRight then If Qc[Xq,Yq]>-3 then Dec(Qc[Xq,Yq]);
If Button=mbMiddle then Qc[Xq,Yq]:=0;
RefreshSquare(Xq,Yq);
end;
procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,Y: Integer);
begin
If Xxl=False then Xxl:=True;
RefreshStatus(X div 25,Y div 25);
end;
procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);
begin
Stop; Redactor;
end;
procedure TForm1.N6Click(Sender: TObject);
Var I,P:SmallInt;
begin
Stop; Redactor;
For I:=0 to 63 do For P:=0 to 47 do Qc[I,P]:=0;
For I:=1 to Nc do For P:=1 to 3 do Qrc[I,P]:=0;
Image1.Align:=alNone;
Form1.Refresh;
DrawGrid;
Nc:=0;
For I:=0 to 63 do For P:=0 to 47 do RefreshSquare(I,P);
Form1.StatusBar1.Panels.
end;
procedure TForm1.N2Click(Sender: TObject);
begin
Close;
end;
procedure TForm1.N8Click(Sender: TObject);
Var I,P:SmallInt;
Name,Ex:String;
begin
SaveDialog1.Execute;
Name:=SaveDialog1.FileName;
DrawGrid; For I:=0 to 63 do For P:=0 to 47 do RefreshSquare(I,P);
If Name='' then Exit;
Stop; Redactor;
If Name[Length(Name)-3]<>'.' then Name:=Name+'.mez';
For I:=Length(Name)-2 to Length(Name) do Ex:=Ex+UpCase(Name[I]);
If Ex<>'MEZ' then Name:=Name+'.mez';
If FileExists(Name) then
If Application.MessageBox('Файл
AssignFile(F,Name);
Rewrite(F);
Write(F,Qc);
CloseFile(F);
end;
procedure TForm1.N7Click(Sender: TObject);
{Const Dop:Set of Char=['э','ю','я','*',' '];}
Var Name,Ex:String;
I,P:SmallInt;
Sym:LongWord;
Fault:Boolean;
begin
If OpenDialog1.Execute=False then Exit;
Name:=OpenDialog1.FileName;
Memo1.Lines.LoadFromFile(Name)
Sym:=0; Fault:=False;
For I:=0 to Memo1.Lines.Count-1 do
For P:=1 to Length(Memo1.Lines[I]) do {If Memo1.Lines[I][P] in Dop then} Inc(Sym) {else Fault:=True};
If Sym<>3072 then Fault:=True;
If Fault=True then begin
Application.MessageBox('
Exit;
end;
DrawGrid; For I:=0 to 63 do For P:=0 to 47 do RefreshSquare(I,P);
If Name='' then Exit;
Stop; Redactor;
If Name[Length(Name)-3]<>'.' then Name:=Name+'.mez';
For I:=Length(Name)-2 to Length(Name) do Ex:=Ex+UpCase(Name[I]);
If Ex<>'MEZ' then Name:=Name+'.mez';
AssignFile(F,Name);
Reset(F);
Read(F,Qc);
CloseFile(F);
DrawGrid; For I:=0 to 63 do For P:=0 to 47 do RefreshSquare(I,P);
end;
procedure TForm1.N12Click(Sender: TObject);
Var I,P:SmallInt;
begin
For I:=1 to Nc do For P:=1 to 3 do Qrc[I,P]:=0; Nc:=0;
Stop; PaintLines; CalcA:=True;
end;
procedure TForm1.N13Click(Sender: TObject);
begin
StatusBar1.Panels.Items[4].
Stop;
Prepare; ElRefresh;
Form1.Image1.Repaint;
Form1.Image1.Canvas.Pen.Color:
LineExpl:=True;
end;
procedure TForm1.Image1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
Var I,P:Integer;
B,E:LongWord;
T,N,Vx,Vy,Deg,Dx,Dy:Real;
begin
If (LineExpl=True) then begin
Form1.Image1.Canvas.Pen.Color:
ElTrackForMoving(X,Y,1,0);
ElTrackForMoving(X,Y,-1,0);
end else
If (EkviExpl=True) then begin
B:=DateTimeToTimeStamp(Now).
If Potenc(X,Y)=0 then Exit;
Form1.Image1.Canvas.Pen.Color:
For I:=-1600 to 1600 do For P:=-1200 to 1200 do Ekv[I,P]:=False; A:=0;
EkX:=X; EkY:=Y; Ekv[X,Y]:=True; EnNow:=0;
PaintEkvi(X,Y,Potenc(X,Y),0);
E:=DateTimeToTimeStamp(Now).
Form1.Image1.Refresh;
Form1.StatusBar1.Panels.Items[
end else
If (CalcA=True) then begin
Vx:=0; Vy:=0;
For I:=1 to Nc do begin
Dx:=(Qrc[I,1]-X)/25*
Dy:=(Qrc[I,2]-Y)/25*
Deg:=Sqrt(Dx*Dx+Dy*Dy);
Deg:=Deg*Deg*Deg;
If Deg=0 then Exit;
Vx:=Vx+(9*10E9*(Qrc[I,3])*
Vy:=Vy+(9*10E9*(Qrc[I,3])*StrT
end;
N:=Sqrt(Vx*Vx+Vy*Vy);
Form3.Label7.Caption:= FloatToStr(N);
Form3.Label2.Caption:= FloatToStr(RealPotenc(X,Y));
If Vx<>0 then begin
T:=180*ArcTan(-Vy/Vx)/Pi;
Информация о работе Исследование и моделирование с помощью компьютера электрических полей