unit Unit5; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Unit1; type TKor1Box = class(TForm) GroupBox1: TGroupBox; Label1: TLabel; Label2: TLabel; Label3: TLabel; Edit1: TEdit; Button1: TButton; Button2: TButton; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Edit1Change(Sender: TObject); private { Private declarations } public { Public declarations } end; var Kor1Box: TKor1Box; procedure PlotMainR; procedure PlotMainC; procedure PlotMainL; procedure PlotMainG; procedure PlotMainZ; procedure PlotMainV; procedure PlotMainA; procedure PlotMainB; procedure PlotMainF; function R0(d: Real): Real; function Induct(f: Real): Real; function Emcost: Real; function Faza(f: Real): Real; implementation uses ls; {$R *.DFM} procedure TKor1Box.Edit1Change(Sender: TObject); var xxx: String; i: Integer; begin xxx:=Edit1.Text; Val(xxx, nl, i); d1:=d+2*0.08+nl*2*0.045; d3:=2.42*d1; a:=d1*Sqrt(2); end; function R0(d: Real): Real; begin r0:=(ro*1000)/(Pi*d*d*0.25)*1e6; end; function Induct(f: Real): Real; begin Induct:=b*(4*ln((a-d/2)/(d/2))+Qkr(f))*1e-4; end; function Emcost: Real; var ss: Real; begin ss:=(Sqr(d3+d1+d)-a*a)/(Sqr(d3+d1+d)+a*a); Emcost:=(b*1.35*0.000001)/(36*ln(a*ss)/(d*0.5)); end; function Resistant(f: LongInt): Real; var rm1, rm2: Real; begin rm1:=Scrut*Gkr(f)*(d1/a)*(d1/a); rm2:=1-Hkr(f)*(d1/a)*(d1/a); Resistant:=2*r0(d)*b*(1+Fkr(f)+rm1/rm2); end; function Faza(f: Real): Real; begin Faza:=2*3.14*Sqrt(Induct(f)*Emcost); end; procedure PlotMainR; function TyRs(f: LongWord): real; begin TyRs:=1/(Resistant(f)/416); end; function FVideo(f: Real): Real; begin FVideo:=1/(f/673); end; var i: LongInt; Rcol: TColor; fv: Real; begin With MainForm do With PageLst do With GraphR.Canvas do begin Pen.Color:=clBlack; Rectangle(0,0,673,417); MoveTo(10,10); LineTo(10,405); MoveTo(10,405); LineTo(663,405); Rcol:=rgb(Random(255), Random(255), Random(255)); For i:=0 to f do Pixels[Round(i*FVideo(f)+10),417-Round(Resistant(i)*TyRs(f)-13)]:=Rcol; end; end; procedure PlotMainC; var i: LongInt; ss: Real; mmm: String; begin With MainForm do With PageLst do With GraphC.Canvas do begin Pen.Color:=clBlack; Rectangle(0,0,673,417); MoveTo(10,10); LineTo(10,405); MoveTo(10,405); LineTo(663,405); For i:=10 to 673 do begin Pen.Color:=clRed; Pixels[i,417-Round(Emcost*1e9)]:=clRed; end; { Str(c, mmm); MainForm.Edit1.Text:=mmm;} end; end; procedure PlotMainL; function TyIn(f: LongWord): real; begin TyIn:=1/(Induct(0)/419); end; function FVideo(f: Real): Real; begin FVideo:=1/(f/673); end; var i: LongInt; mmm: String; Rcol: TColor; begin With MainForm do With PageLst do With GraphL.Canvas do begin Pen.Color:=clBlack; Rectangle(0,0,673,417); MoveTo(10,10); LineTo(10,405); MoveTo(10,405); LineTo(663,405); Rcol:=rgb(Random(255), Random(255), Random(255)); For i:=0 to f do Pixels[Round(i*FVideo(f)+10),417-Round(Induct(i)*TyIn(f)-13)]:=Rcol; end; Str(Induct(f), mmm); MainForm.Edit1.Text:=mmm; end; procedure PlotMainG; begin With MainForm do With PageLst do With GraphG.Canvas do begin Pen.Color:=clBlack; Rectangle(0,0,673,417); MoveTo(336,0); LineTo(336,417); MoveTo(0,208); LineTo(673,208); end; end; procedure PlotMainA; function TyIn(f: LongWord): real; begin TyIn:=1/(Induct(0)/419); end; function FVideo(f: Real): Real; begin FVideo:=1/(f/673); end; var i: LongInt; mmm: String; Rcol: TColor; begin With MainForm do With PageLst do With GraphL.Canvas do begin Pen.Color:=clBlack; Rectangle(0,0,673,417); MoveTo(10,10); LineTo(10,405); MoveTo(10,405); LineTo(663,405); Rcol:=rgb(Random(255), Random(255), Random(255)); For i:=0 to f do Pixels[Round(i*FVideo(f)+10),417-Round(Induct(i)*TyIn(f)-13)]:=Rcol; end; end; procedure PlotMainB; function TyIn(f: LongWord): real; var rm: Real; begin rm:=Faza(f); If (rm>417) and (rm<=0) then TyIn:=1/(rm/405) else TyIn:=1; end; function FVideo(f: Real): Real; begin FVideo:=1/(f/673); end; var i: LongInt; mmm: String; Rcol: TColor; begin With MainForm do With PageLst do With GraphB.Canvas do begin Pen.Color:=clBlack; Rectangle(0,0,673,417); MoveTo(10,10); LineTo(10,405); MoveTo(10,405); LineTo(663,405); Rcol:=rgb(Random(255), Random(255), Random(255)); For i:=0 to f do Pixels[Round(i*FVideo(f)+10),417-Round(Faza(i)*TyIn(f)-13)]:=Rcol; end; end; procedure PlotMainF; begin With MainForm do With PageLst do With GraphF.Canvas do begin Pen.Color:=clBlack; Rectangle(0,0,673,417); MoveTo(336,0); LineTo(336,417); MoveTo(0,208); LineTo(673,208); end; end; procedure PlotMainZ; begin With MainForm do With PageLst do With GraphZ.Canvas do begin Pen.Color:=clBlack; Rectangle(0,0,673,417); MoveTo(336,0); LineTo(336,417); MoveTo(0,208); LineTo(673,208); end; end; procedure PlotMainV; var i: Word; v: real; begin With MainForm do With PageLst do With GraphV.Canvas do begin Pen.Color:=clBlack; Rectangle(0,0,673,417); MoveTo(336,0); LineTo(336,417); MoveTo(0,208); LineTo(673,208); For i:=10 to 673 do begin v:=1/Sqrt(Induct(i*100000)*Emcost); Pen.Color:=clRed; Pixels[i,417-Round(v/1e5+200)]:=clRed; end; end; end; procedure TKor1Box.Button1Click(Sender: TObject); var mmm: String; begin Close; PlotMainR; PlotMainC; PlotMainL; PlotMainG; PlotMainA; PlotMainB; PlotMainZ; PlotMainF; PlotMainV; Str(r0(d), mmm); MainForm.Edit2.Text:=mmm; end; procedure TKor1Box.Button2Click(Sender: TObject); begin Close; end; end.