![]() |
Eugeniusz Jakubas |
Stąd można pobrać teksty źródłowe poniższych 57 programów w Pascalu pr-pascal.zip - 34 kB
55. Zbiory Julii
Program Zbior_Julii; uses crt,graph; var karta,tryb,n,k,i,obr,siatka:integer; x,y,xst,yst,Re_c,Im_c,xpocz,xkon,ypocz,ykon,krok_x,krok_y:real; begin karta:=detect; initgraph(karta,tryb,''); xpocz:=-1.8; xkon:=1.8; ypocz:=-1.3; ykon:=1.3; krok_x:=(xkon-xpocz)/630; krok_y:=(ykon-ypocz)/420; for n:=1 to 630 do for k:=1 to 420 do begin Re_c:=xpocz+n*krok_x; Im_c:=ypocz+k*krok_y; xst:=Re_c; yst:=Im_c; i:=0; repeat x:=xst*xst-yst*yst; y:=2*xst*yst-1; xst:=x; yst:=y; i:=i+1; until (x*x+y*y>8) or (i>12); if keyPressed then exit; if i>12 then putPixel(n,420-k+30,white); putPixel(n,420-k+30,i); end; readln; closeGraph; end. |
![]() |