{$N+} {Michael Huang Julia Generator} uses winixmod,crt; type complex =record x:real; i:real; end; const divs=160; blowup=10; mxc=256; var cycle:word; norm:extended; point,npoint:complex; a,b:integer; ci,cx : extended; S : String; ch : Char; t,q : text; begin assign(t,'c:\swap.tmp'); rewrite(t); assign(q,'x.pal'); reset (q); while not(eof(q)) do begin readln ( q, S ); writeLn( t, S ); end; close ( t ); close ( q ); randomize; ci := (random(10000) / 10000)-0.5; cx := (random(10000) / 10000)-0.5; WriteLn ( ci:0:5 ); WriteLn ( cx:0:5 ); { WriteLn ( 'Enter pallette file: '); ReadLn ( S ); } S := 'c:\swap.swp'; cx := 0.191035774; ci := -0.593232841; Screen.init; Screen.MakePal(S); Screen.SetCol(0,0,0,0); for b := 0 to 255 Do for a := 0 to 199 do Screen.FPix(B,A,B); ch := ReadKey; for b:=0 to 199 do begin for a:=0 to 320 do begin norm:=0; cycle:=0; point.x:=(a-160)/divs; point.i:=(b-100)/divs; while (norm<=blowup) and (cycle<=mxc) do begin npoint.x:=(point.x*point.x) - (point.i*point.i) + cx; npoint.i:=2*point.i*point.x+ci; inc(cycle); point.x:=npoint.x; point.i:=npoint.i; norm:= (point.x*point.x)+(point.i*point.i); if norm<0 then norm:=11 else norm:=sqrt( (point.x*point.x)+(point.i*point.i) ); end; Screen.fpix(a,b,(cycle div 2)); Screen.pix(a,b,(cycle div 2)); if Keypressed Then Begin ch := readKey; repeat ch := ReadKey; Screen.MakePal(S); Screen.OutScr; until ch = 'q'; Screen.Fin; Erase(T); Halt; End; end; end; repeat ch := ReadKey; Screen.MakePal(S); Screen.OutScr; until ch = 'q'; Screen.fin; Erase(T); end.