7.
(11.05.2003 23:35)
0
05.05.2003 11:08 Рафаель program period; {Copyright by Rafff} uses crt,graph; {$i grini} const r=0.24; var Sx,Sy,hu,hv,x:real; i,n : integer; function F(x:real):real; begin F:=4*r*x*(1-x) end; Procedure Init; begin x:=0.1; n:=100; Sx:=getmaxx/n; Sy:=getmaxy; hu:=10; hv:=getmaxy-10; end; procedure Outres (x:integer;y:real); var u,v:integer; begin u:=round(sx*x+hu); v:=round(-sy*y+hv); putpixel(u,v,green);setcolor(green);lineto(u,v) ; end;
Begin grini;init;
for i:=1 to n do begin x:=F(x); { writeln('x[',i,']=',x:6:4);} Outres(i,x); end; repeat until keypressed; closegraph end. 05.05.2003 11:04 pavlov program new{Pavlov}; uses crt,graph; {$i grini} const r=0.9; n=100; var x,x0,sx,sy:real; i,hu,hv:integer; u,v,u1,v1:integer; {************************************************************************} procedure init; begin sx:=getmaxx/n; sy:=getmaxy; hu:=10; hv:=getmaxy-10; x0:=0.00001; x:=0; end; {***********************************************************************} procedure outres(c,z:real); begin u:=round(sx*c+hu); v:=round(-sy*z+hv); u1:=round(sx*(c-1)+hu); v1:=round(-sy*x0+hv); end; {************************************************************************} begin grini; init; for i:=1 to n do begin u:=round(sx*i+hu); v:=round(-sy*x0+hv); x:=4*r*x0*(1-x0); u1:=round(sx*(i+1)+hu); v1:=round(-sy*x+hv); line(u,v,u1,v1); x0:=x; end; readln; closegraph; end. 05.05.2003 11:01 xxx Program xxx; uses {crt,} graph; {$I GrIni} var t, dt, tmax, rmax: real; Sx, Sy,dr,df,x: real; Hu, i,Hv, u, v,n: integer; var r,f,krb,krd,kfb,kfd,g: real; procedure Init; begin n:=100; r:=0.2; x:=0.1; sx:=getmaxx/n; sy:=getmaxy; hu:=10; hv:=getmaxy-10; end; procedure OutRes( x, y : real; color: word ); begin u:=round(x*sx+Hu); v:=round(-y*sy+Hv); PutPixel(u,v,Color); end; {procedure Euler; } begin GrIni; init; for i:=1 to n do begin x:=4*x*r*(1-x); outres(i,x,white) ; end; readln; closegraph ; end.
|