# This text file describes bitmap :C:\Documents and Settings\adam\Desktop\mandel_ArgPhi_error2.bmp # # # This bitmap shows Mandelbrot Set for function F(z)=z*z+c # # # Bitmap details: #------------------------------------------------------------ MainAlgorithmType:=maPhi #----------------------------------------------------------- # The image contains a rectangular region : #---------- corners of c-plane --------------- C_Plane.eCxMin:= -2,5 C_Plane.eCxMax:= 1,5 C_Plane.eCyMin:= -2 C_Plane.eCyMax:= 2 #--------- center and sides of c-plane ----------- C_Plane.Center.x:= -0,5 C_Plane.Center.y:= 0 C_Plane.width:= 4 C_Plane.height:= 4 #--------------------------------- # Bitmap size in pixels: Bitmap Width= 800 Bitmap Height= 800 Number of bitmap points = 640000 points Drawing Time := 1422 miliseconds # # Bitmapa.PixelFormat = pf32bit #------------------------------------ # If Distorsion = 1 then image is not deformed integer Width / Height Ratio =1 extended Width / Height Ratio =1 eWHR/iWHR = Distorsion=1 #---------------------------------------------------- # Maximal number of iterations IterationMax :integer:= 1000 Escape Radius :single:= 100 #------------------------- # # Informations about program: program name: MandelbrotSetExplorer # It is made using: # programing language: object Pascal # compiler : VER 140- # IDE: Borland Delphi 6.0 - 7.0 personal edition - 10.0 Turbo Explorer # programing style : obiektowy # method : wizualna (RAD) # libaries : standard = VCL # OS: windows 98 SE # hardware: PC: AMD Duron 600 # # author: Adam Majewski # adammaj1@o2.pl # republika.pl/fraktal # wa³brzych 27.06.20003- 2007 //--------------------- code ------------- procedure GreenSum2 (C,Z:TComplexNumber; var B:TComplexNumber); // = 1 + (c/z2) var Z2,temp :TComplexNumber; begin // z2 = z*z ComplexSqr(Z,Z2); // temp = c /z2 ComplexDiv(C,Z2,Temp); // out = 1+ temp B.x:=1 +Temp.x; B.y:=Temp.y; end; //------------------------ Procedure DrawPhi2_M; var iteration:integer; iY,iX:integer; eZx,eZy:extended; // eZ:=eZx + eZy*i eCy ,eCx:extended; // C:=eCx + eCy*i temp:extended; //Phi ePhiX,ePhiY:extended; c,Z,G,B,Btemp:TComplexNumber; //argument_Phi:extended; // p:integer; k:integer; // color:TColor; // begin For iY :=iYmin to iYMax do begin C.y:=Convert_iY_to_eY(iY); for iX:=iXmin to iXmax do begin C.x:=Convert_iX_to_eX(iX); // Z0 = initial point Z.x:=0; Z.y:=0; // B.x:=C.x; B.y:=C.y; // For iteration:=0 to iterationMax-1 do begin // Z(n+1):= Sqr(Zn) + C temp:=Sqr(Z.x)-Sqr(Z.y) +C.x; Z.y:=2*Z.x*Z.y+C.y; Z.x:=temp; //G:= 1+(c/sqr(z)) GreenSum2 (C,Z,G); // p:= 2^(iteration+1) p:= PowerOf2(iteration+1); //Btemp:=G^ p ComplexPower(G,p,Btemp); //if hypotenuse(btemp)>1000 then exit; //B:=B*Btemp ComplexMultiplication(B,Btemp,B); //if hypotenuse(b)>1000 then exit; if (Sqr(Z.x)+Sqr(Z.y))> bailout2 then break; end; // // drawing procedure if iteration=IterationMax then // M-set with Bitmap1.FirstLine[iY*Bitmap1.LineLength+iX] do begin B := 0; G := 0; R := 0; //A := 0; end else // exterior of M-set begin k:= round(RadToDeg(CmplxArgumentInRad(b.x,b.y))); color:=Rainbow(0,360,k ); with Bitmap1.FirstLine[iY*Bitmap1.LineLength+iX] do begin B := GetBValue(color); // G := GetGValue(color); R := GetRValue(color); // //A := 0; end ; end ; //else //-------------- // // end of drawing procedure ---------- end; // for iX end; //For iY end; //---------------------------