|
|||
begin. whileomega<=N*omega_0 do. whilet<=tk do. ifamp>amp_rez then. whilex<=b dobegin t: =0; v: =1; a: =3; Hu: =45; Hv: =Window. Center. y; Sx: =WindowWidth/tk; Sy: =WindowHeight; Euler; Line(0, Hv, Window. Width, Hv); Line(Hu, 0, Hu, Window. Height); window. Title: =' график колебаний ' end. 8)резонанс program mayatniki; uses GraphABC; const dt=0. 01; Hu=0; b=0. 5; N=3;
var amp, sx, sy, t, x, tk, v, a, omega_0, omega, amp_rez, omega_rez: real; procedure out (x, y: real; c: system. drawing. color);
begin var u, v, Hv: integer; Hv: =Window. Height; u: =round(Hu+x*sx); v: =round(Hv-y*sy); PutPixel(u, v, c); end;
begin omega: =1; omega_0: =8; Sx: =Window. Width/N/omega_0; Sy: =Window. Height*2. 5;
whileomega< =N*omega_0 do begin tk: =100*2*pi/omega; amp: =0; v: =0; x: =2; t: =0;
whilet< =tk do begin a: =-sqr(omega_0)*x-b*v+sin(omega*t); v: =v+a*dt; x: =x+v*dt; if ((t> 98*2*pi/omega) and (x> amp)) then amp: =x; t: =t+dt; end; out (omega, amp, ClRed); ifamp> amp_rez then begin amp_rez: =amp; omega_rez: =omega; end; writeln(amp: 2: 2); omega: =omega+0. 001; end; writeln('резонансная частота=', omega_rez: 3: 3); writeln('амплитуда резонанса=', amp_rez: 3: 3); end. 9)Юнг program UYING; uses GraphABC; const L=2000; lymbda1=0. 0004; lymbda2=0. 00045; dt=0. 00015; b=0. 3; d=5; omega=3; var I1, I2, E01, E02, y1, y2, x: REAL; Sx, Sy: real; Hv, Hu: integer; procedure out ( var x, y: real; c: Color); var u, v: integer; Begin u: =round(Hu+Sx*x); v: =round(Hv-Sy*y); PutPixel(u, v, c); end; begin Hu: =Window. Center. x; Hv: =Window. Height; Sx: =Window. width/2/b; Sy: =Window. Height/4; x: =-b; window. Title: ='график интерференции'; begin whilex< =b do begin y1: =sqrt(sqr(x-d/2)+L*L); y2: =sqrt(sqr(x+d/2)+L*L); E01: =2*cos(Pi/lymbda1*(y2-y1)); E02: =2*cos(Pi/lymbda2*(y2-y1)); I1: =sqr(E01); I2: =sqr(E02); out (x, I1, ClBrown); out (x, I2, ClBlue); x: =x+dt; end; end; end. 10)хищники и жертвы program ABC; uses GraphABC; const dt=0. 001; tk=100; G=5; kFB=0. 01; kRB=0. 1; kRD=0. 1; kFD=0. 2; var Sx, Sy, R, F, t: real; Hu, Hv: integer; procedure out ( var x, y: real; C: System. Drawing. Color); begin var u, v: integer; u: =Round(Hu+Sx*x); v: =Round(Hv-Sy*y); PutPixel (u, v, c); end; procedure Euler;
|
|||
|