{$N+} {Michael Huang Julia Generator} uses winixmod,crt; type complex =record x:real; i:real; end; const divs=1600; blowup=10; mxc=256; var cycle:word; norm:extended; point,npoint:complex; a,b:integer; ci,cx : extended; S : String; ch : Char; begin randomize; { ci := (random(10000) / 10000)-1; cx := (random(10000) / 10000); WriteLn ( ci:0:5 ); WriteLn ( cx:0:5 ); WriteLn ( 'Enter pallette file: '); ReadLn ( S ); } S := 'x.pal'; ci := -0.3413; cx := 0.4115; 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; Screen.Cls(0); 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)); if Keypressed Then Begin Screen.Fin; Halt; End; end; end; ch := ReadKey; Screen.fin; end.