close
Jump to content

File:Julia set f(z)=1 over z3+z*(-3-3*I).png

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia
    Original file (2,000 × 2,000 pixels, file size: 685 KB, MIME type: image/png)

    Summary

    Description
    English: Julia set . Location by Michael Becker[1]. 2 critical points : { -0.4550898605622273*I -1.098684113467809, 0.4550898605622273*I+1.098684113467809}; period 2 cycle = {0, infinity}. Whole plane ( sphere) is a basin of attraction of period 2 cycle ( which is divided into 2 components ). Julia set is a boundary. The Julia set (boundary of filled-in Julia set) itself is not drawn: we see it as the locus of points where the level curves are especially close to each other = a place with high density of level curves. One can see one critical orbit (dots on the level curves)
    Deutsch: f(z)=1/(z3+dz+c) mit c=0 und d=-3(1+i), dargestellt auf [-3;3]x[-3;3].
    Date
    Source Own work
    Author Adam majewski

    Licensing

    I, the copyright holder of this work, hereby publish it under the following license:
    w:en:Creative Commons
    attribution share alike
    This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
    You are free:
    • to share – to copy, distribute and transmit the work
    • to remix – to adapt the work
    Under the following conditions:
    • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
    • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.


    c source code

    /*
    
    
    
      here are:
      * 2 critical points
      * 1 period 2 basin
    
    
    
    
    
    
    
    
      https://web.archive.org/web/20161024194536/http://www.ijon.de/mathe/julia/some_julia_sets_3.html
    
      
      
     
      Adam Majewski
      adammaj1 aaattt o2 dot pl  // o like oxygen not 0 like zero 
      
      
      
      Structure of a program or how to analyze the program 
      
      
      ============== Image X ========================
      
      DrawImageOf -> DrawPointOf -> ComputeColorOf ( FunctionTypeT FunctionType , complex double z) -> ComputeColor
      
      
      check only last function  which computes color of one pixel for given Function Type
      
      
    
       
      ==========================================
    
      
      ---------------------------------
      indent d.c 
      default is gnu style 
      -------------------
    
    
    
      c console progam 
      
      export  OMP_DISPLAY_ENV="TRUE"	
      gcc d.c -lm -Wall -march=native -fopenmp
      time ./a.out > b.txt
    
    
      gcc d.c -lm -Wall -march=native -fopenmp
    
    
      time ./a.out
    
      time ./a.out >i.txt
      time ./a.out >e.txt
      
      
      
      
      
      
      convert -limit memory 1000mb -limit disk 1gb dd30010000_20_3_0.90.pgm -resize 2000x2000 10.png
    
      
      
      
    */
    
    #include <stdio.h>
    #include <stdlib.h>		// malloc
    #include <string.h>		// strcat
    #include <math.h>		// M_PI; needs -lm also
    #include <complex.h>
    #include <omp.h>		// OpenMP
    #include <limits.h>		// Maximum value for an unsigned long long int
    
    
    
    // https://sourceforge.net/p/predef/wiki/Standards/
    
    #if defined(__STDC__)
    #define PREDEF_STANDARD_C_1989
    #if defined(__STDC_VERSION__)
    #if (__STDC_VERSION__ >= 199409L)
    #define PREDEF_STANDARD_C_1994
    #endif
    #if (__STDC_VERSION__ >= 199901L)
    #define PREDEF_STANDARD_C_1999
    #endif
    #endif
    #endif
    
    
    
    
    /* --------------------------------- global variables and consts ------------------------------------------------------------ */
    
    
    //FunctionType = algorithms = methods = representation finctions = 
    typedef enum  {Fatou_ab = 0, Fatou_abi = 2,  LSM = 3, LSM_m = 4, Unknown = 5 , BD = 6, MBD = 7 , SAC = 8, DLD = 9, ND = 10 , NP= 11, POT = 12 , Blend = 13, DEM = 14,
    		
    } FunctionTypeT; 
    // FunctionTypeT FunctionType;
    
    // virtual 2D array and integer ( screen) coordinate
    // Indexes of array starts from 0 not 1 
    //unsigned int ix, iy; // var
    static unsigned int ixMin = 0;	// Indexes of array starts from 0 not 1
    static unsigned int ixMax;	//
    static unsigned int iWidth;	// horizontal dimension of array
    
    static unsigned int iyMin = 0;	// Indexes of array starts from 0 not 1
    static unsigned int iyMax;	//
    
    static unsigned int iHeight = 20000;	//  
    // The size of array has to be a positive constant integer 
    static unsigned long long int iSize;	// = iWidth*iHeight; 
    
    // memmory 1D array 
    unsigned char *data;
    unsigned char *edge;
    //unsigned char *edge2;
    
    // unsigned int i; // var = index of 1D array
    //static unsigned int iMin = 0; // Indexes of array starts from 0 not 1
    static unsigned int iMax;	// = i2Dsize-1  = 
    // The size of array has to be a positive constant integer 
    // unsigned int i1Dsize ; // = i2Dsize  = (iMax -iMin + 1) =  ;  1D array with the same size as 2D array
    
    
    
    // see SetPlane
    
    double radius = 3.0; //4.5; //2.1; //
    complex double center = 0.0 ;
    double  DisplayAspectRatio  = 1.0; // https://en.wikipedia.org/wiki/Aspect_ratio_(image)
    // dx = dy compare setup : iWidth = iHeight;
    double ZxMin; //= -1.3;	//-0.05;
    double ZxMax;// = 1.3;	//0.75;
    double ZyMin;// = -1.3;	//-0.1;
    double ZyMax;// = 1.3;	//0.7;
    double PixelWidth;	// =(ZxMax-ZxMin)/ixMax;
    double PixelHeight;	// =(ZyMax-ZyMin)/iyMax;
    
    // dem
    double BoundaryWidth ; //= 1.0*iWidth/2000.0  ; //  measured in pixels ( when iWidth = 2000) 
    double distanceMax ; //= BoundaryWidth*PixelWidth;
    
    
    double ratio; 
    
    
    /*
      ER = pow(10,ERe);
      AR = pow(10,-ARe);
    */
    //int ARe ;			// increase ARe until black ( unknown) points disapear 
    //int ERe ;
    double ER;
    double ER2;			//= 1e60;
    double AR1; // bigger values do not works
    double AR1_2;
    
    //double AR2; // bigger values do not works
    //double AR2_2;
    
    
    //double AR_max;
    //double AR12;
    
    
    
    int IterMax = 100000;
    int IterMax_LSM = 1000;
    int IterMax_DEM = 100000;
    
    /* colors = shades of gray from 0 to 255 
    
       unsigned char colorArray[2][2]={{255,231},    {123,99}};
       color = 245;  exterior 
       
       here are two period 2 basins: basin1  and basin2
       each basin is a basin of attraction of period 2 cycle
       
       Each cycle has immediate basin of attraction which consist of 2 components ( and it's preimages)
       so we need 4 colors 
       
       also exterior is a component oof one basin , 
       it is not a basin of attraction to infiiniity
       
       
       
       
       
    */
    unsigned char iColorOfBasin1 = 245;
    unsigned char iColorOfBasin2 = 99;
    
    
    
    
    
    unsigned char iColorOfBoundary = 0;
    unsigned char iColorOfUnknown = 5;
    
    // pixel counters
    unsigned long long int uUnknown = 0;
    unsigned long long int uInterior = 0;
    unsigned long long int uExterior = 0;
    
    
    
    /* critical points
    
    
       [-1.0*(0.4550898605622273*%i+1.098684113467809),
       0.4550898605622273*%i+1.098684113467809]
    
    
    
    */
    
    
    const complex double z_cr[2]= { -0.4550898605622273*I -1.098684113467809,  0.4550898605622273*I+1.098684113467809};
    
    complex double zcr1  ; //
    complex double zcr2  ;// = -2.2351741790771484375e-08+9.4296410679817199707e-09*I;
    
    // -0.8366600265340756*%i,0.8366600265340756*%i 
    
    
    
    const int period = 2;
    
    // periodic points = attractors
    //complex double z1 =  0.0 ; //fixed point (period  1) =  attracting cycle
    
    /*
      attracting periodic points : 
      2 period 2 cycles found by marcm200
      https://fractalforums.org/fractal-mathematics-and-new-theories/28/rational-function/4279/msg29227#msg29227
      
      z = +1.6890328811664648 +0.0000000000000000*I is in the probably attracting period 2 cyle  { +1.6890328811664648 +0.0000000000000000*I ,  +0.1147519899962205 +0.0000000000000000*I } 	
      z = +0.1147519899962201 +0.0000000000000000*I is in the probably attracting period 2 cyle  { +0.1147519899962201 +0.0000000000000000*I ,  +1.6890328811664670 +0.0000000000000000*I } 
      
      z = +0.4101296722285255 -0.5079485669960778*I is in the probably attracting period 2 cyle  { +0.4101296722285255 -0.5079485669960778*I ,  +0.4101296722285255 +0.5079485669960778*I } 		  
      z = +0.4101296722285255 +0.5079485669960778*I is in the probably attracting period 2 cyle  { +0.4101296722285255 +0.5079485669960778*I ,  +0.4101296722285255 -0.5079485669960778*I } 		  
    
    
      		  
    
      
    */
    
    const complex double zp2a = 0.0 ;
    const complex double zp2b = 0.0;
    
    //const complex double zpa[2]= { +0.4101296722285255 +0.5079485669960778*I ,  +0.4101296722285255 -0.5079485669960778*I };
    //const complex double zpb[2] = { +1.6890328811664648 +0.0000000000000000*I ,  +0.1147519899962205 +0.0000000000000000*I };
    
    /* ------------------------------------------ functions -------------------------------------------------------------*/
    
    /* 
       original
       f(z)=1/(z3+dz+c) mit c=0,37 und d=2,1, dargestellt auf [-2,1;2,1]x[-2,1;2,1].
    
       modified 
    
    */
    const complex double a =  -3-3*I;
    const complex double b = 0.0;
    
    // complex function
    complex double f(const complex double z0) {
    
      double complex z = z0;
      complex double z3 = z*z*z;
      
      z = 1.0/(z3 + a*z + b);
      return  z;
    }
    	
    
    /* 
    
       d(z):=-(3*z^2+2.1)/(z^3+2.1*z+0.37)^2
    
    */
    complex double dfz(const complex double z0) {
    
    
      // dz= 
      double complex z = z0;
      complex double z2= z*z;
      complex double z3 = z*z2;
      complex double numerator = -3.0*z2 + 2.1 ;
      complex double denom = z3 + 2.1*z + 0.37;
      denom = denom*denom; // ^2
    	
    	
      return  numerator/denom;
    	
    }
    		
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    // from screen to world coordinate ; linear mapping
    // uses global cons
    double GiveZx (int ix)
    {
      return (ZxMin + ix * PixelWidth);
    }
    
    // uses globaal cons
    double GiveZy (int iy)
    {
      return (ZyMax - iy * PixelHeight);
    }				// reverse y axis
    
    
    complex double GiveZ (int ix, int iy)
    {
      double Zx = GiveZx (ix);
      double Zy = GiveZy (iy);
    
      return Zx + Zy * I;
    
    
    
    
    }
    
    
    
    
    
    
    
    //------------------complex numbers -----------------------------------------------------
    
    double cabs2(complex double z){
    
      return creal(z)*creal(z)+cimag(z)*cimag(z);
    
    
    }
    
    
    
    
    
    
    /* -----------  array functions = drawing -------------- */
    
    /* gives position of 2D point (ix,iy) in 1D array  ; uses also global variable iWidth */
    unsigned int Give_i (unsigned int ix, unsigned int iy)
    {
      return ix + iy * iWidth;
    }
    
    
    
    
    
    
    
    
    
    
    
    
    /* 
    
       is it possible to adjust AR so that level curves in interior have figure 8?
    
       find such AR for internal LCM/J and LSM that level curves croses critical point and it's preimages
       for attracting ( also weakly attracting = parabolic) dynamics
    
       it may fail 
       * if one iteration is bigger then smallest distance between periodic point zp and Julia set
       * if critical point is attracted by another cycye ( then change periodic point zp)
    
       Made with help of Claude Heiland-Allen
    
    
       attracting radius of circle around finite attractor
       there are 2 basins so  
      
      
       It would have to be done separately in each basin.
    
       A suggested method:
    
       For each critical point, forward iterate to find an attractor and then thin out the critical point set to only one per basin by removing all but one that converge to a common attractor, for each attractor.
       For each pixel, calculate a smoothed iteration value (e.g. using the methods in my GVC coloring ucl) and note which basin it is in.
       For each critical point in the reduced set, calculate a smoothed iteration value using the same method as in step 2.
       For each pixel, subtract from its smoothed iteration value the one found in step 3 for the critical point that shares its basin. Note that the critical point itself, if inside the image rectangle and in a pixel center, will end up with zero and some points may end up with negative values.
       The level set boundaries you want will now be the boundaries where the sign or the integer part of the modified smoothed iteration value changes. In particular, the -0.something to +0.something transition will pass through the critical point, the n.something to (n+1).something transitions for nonnegative n will pass through its images, and the same for negative n will pass through its preimages.
    
       pauldebrot 
       https://fractalforums.org/programming/11/crtical-points-and-level-curves/4323/msg29514#new
      
    
    
    */
    double GiveTunedAR1(const double iter_Max){
    
      fprintf(stdout, " GiveTunedAR1\n");
    
      complex double z = zcr1; // initial point z0 = criical point 
      double iter;
      double r; // = 100 * PixelWidth; // initial value 
      //double t;
      
      
      r = cabs(z);
      fprintf(stdout, "AR1  = %f = %d * pixeWidth \n",  r, (int) (r/PixelWidth));	
      
      // iterate critical point
      for (iter=0; iter< iter_Max; iter+=1.0 ){
    		
    	
        z = f(z); // forward iteration
        z = f(z);
      	
        r = cabs(z);
        fprintf(stdout, "AR1  = %f = %d * pixeWidth \n",  r, (int) (r/PixelWidth));	
      
      }
      // check distance between zn = f^n(zcr) and periodic point zp
      
      fprintf(stdout, "final AR1  = %f = %d * pixeWidth \n",  r, (int) (r/PixelWidth));
      
      
      // use it as a AR
      return r;
    	
    	
    }
    
    
    
    
    
    
    
    // ****************** DYNAMICS = trap tests ( target sets) ****************************
    
    
    
    
    
    
    
    
    /*
      2 basins 
      - basin 1 
      - basin 2
      - unknown ( possibly empty set ) 
    
    */
    
    unsigned char ComputeColorOfFatou_ab (complex double z)
    {
    
    
    
    	
    	
      int i;			// number of iteration
      for (i = 0; i < IterMax; ++i)
        {
    
    
    		
          // infinity is not superattracting here !!!!!	
          
    	
          // period 2 basin  (0, inf)
          // if ( cabs2(z) < AR1_2 ){
          // return iColorOfBasin1;}
          		
          		
          if ( cabs2(z) > 9.0 )
    	{if (i%2==0)
    	    {return iColorOfBasin1;}
    	  else {return iColorOfBasin2;}
    	}
          	
         
          z = f(z);		//  iteration: z(n+1) = f(zn)
    	
    
        }
    
      
      return iColorOfUnknown;
    
    
    }
    
    
    /*
      1 period 2 basins 
       
    
    */
    
    unsigned char ComputeColorOfFatou_abi (complex double z)
    {
    
    
    
    	
    	
      
    
    
      int i;			// number of iteration
      for (i = 0; i < IterMax; ++i)
        {
    
    
          /// infinity is not superattracting here !!!!!	
    	
      
          //1 Attraction basins 
          
          if ( cabs2(z) > 9.0 )
    	{if (i%2==0)
          		  
    	    { return iColorOfBasin1 - (i % period)*50;}
    	  else { return iColorOfBasin2 + (i % period)*50;}			
    	}
    	
         
          z = f(z);		//  iteration: z(n+1) = f(zn)
    	
    
        }
    
      
      return iColorOfUnknown;
    
    
    }
    
    
    
    
    
    
    unsigned char ComputeColorOfLSM (complex double z)
    {
    
    
    
    	
    	
      //double r2;
    
    
      int i;			// number of iteration
      for (i = 0; i < IterMax_LSM; ++i)
        {
    
    
    		
    
          // infinity is not superattracting here !!!!!
          if ( cabs2(z) <AR1_2 )
    	{if (i%2==0)
          		  
    	    { return iColorOfBasin1 - i *50;}
    	  else { return iColorOfBasin2 + i *50;}			
    	}
    	
          z = f(z);	
          //z=f(z);
        }
    
      return iColorOfUnknown;
    
    
    }
    
    
    
    
    
    
    
    
    
    
    
    
    
    // ***************************************************************************************************************************
    // ************************** DEM/J*****************************************
    // ****************************************************************************************************************************
    /*
    
      here infinity is critical point not a superattracting point
    */
    
    
    unsigned char ComputeColorOfDEMJ(complex double z){
      // https://en.wikibooks.org/wiki/Fractals/Iterations_in_the_complex_plane/Julia_set#DEM.2FJ
    
    
      
      int nMax = IterMax_DEM;
      complex double dz = 1.0; //  is first derivative with respect to z.
      double distance;
      double cabsz;
    	
      int n;
    
      for (n=0; n < nMax; n++){ //forward iteration
        cabsz = cabs(z);
        //if (cabsz > 1e60 || cabs(dz)> 1e60) { break; }// big values 
        //if (IsInterior(z)) { return iColorOfBasin22;} // falls into finite attractor = interior
      			
        dz = dfz(z)*dz; 
        z = f(z) ; /* forward iteration : complex cubic polynomial */ 
      }
      
      
      distance = 2.0 * cabsz* log(cabsz)/ cabs(dz);
      if (distance <distanceMax) return iColorOfBoundary; // distanceMax = BoundaryWidth*PixelWidth;
      // else
      
      return iColorOfBasin1;
    
     
    }
    
    
    
    
    
    
    /* ==================================================================================================
       ============================= Draw functions ===============================================================
       =====================================================================================================
    */ 
    unsigned char ComputeColor(FunctionTypeT FunctionType, complex double z){
    
      unsigned char iColor;
    	
    	
    	
      switch(FunctionType){
      
      case Fatou_ab :{iColor = ComputeColorOfFatou_ab(z); break;}
      	
      case Fatou_abi :{iColor = ComputeColorOfFatou_abi(z); break;}
      
     
      
      case LSM :{iColor = ComputeColorOfLSM(z); break;}
      
      	
        //case LSM_m :{iColor = ComputeColorOfLSM_m(z); break;}
      
        // case DEM : {iColor = ComputeColorOfDEMJ(z); break;}
    	
        /*	
      	case Unknown : {iColor = ComputeColorOfUnknown(z); break;}
    		
      	case BD : {iColor = ComputeColorOfBD(z); break;}
    		
      	case MBD : {iColor = ComputeColorOfMBD(z); break;}
    		
      	case SAC : {iColor = ComputeColorOfSAC(z); break;}
      
      	case DLD : {iColor = ComputeColorOfDLD(z); break;}
    		
      	case ND : {iColor = ComputeColorOfND(z); break;}
    		
      	case NP : {iColor = ComputeColorOfNP(z); break;}
    		
      	case POT : {iColor = ComputeColorOfPOT(z); break;}
    		
      	case Blend : {iColor = ComputeColorOfBlend(z); break;}
        */	
      	
      
      	
      	
    	
      default: {}
    	
    	
      }
    	
      return iColor;
    
    
    
    }
    
    
    // plots raster point (ix,iy) 
    int DrawPoint ( unsigned char A[], FunctionTypeT FunctionType, int ix, int iy)
    {
      int i;			/* index of 1D array */
      unsigned char iColor;
      complex double z;
    
    
      i = Give_i (ix, iy);		/* compute index of 1D array from indices of 2D array */
      
      z = GiveZ(ix,iy);
      
    
      iColor = ComputeColor(FunctionType, z);
      A[i] = iColor ;		// 
      
      return 0;
    }
    
    
    
    
    int DrawImage ( unsigned char A[], FunctionTypeT FunctionType)
    {
      unsigned int ix, iy;		// pixel coordinate 
    
      fprintf (stderr, "compute image %d \n", FunctionType);
      // for all pixels of image 
    #pragma omp parallel for schedule(dynamic) private(ix,iy) shared(A, ixMax , iyMax, uUnknown, uInterior, uExterior)
      for (iy = iyMin; iy <= iyMax; ++iy)
        {
          fprintf (stderr, " %d from %d \r", iy, iyMax);	//info 
          for (ix = ixMin; ix <= ixMax; ++ix)
    	DrawPoint(A, FunctionType, ix, iy);	//  
        }
      fprintf (stderr, "\n");	//info 
      return 0;
    }
    
    
    
    
    
    
    
    int PlotPoint(const complex double z, unsigned char A[]){
    
    	
      unsigned int ix = (creal(z)-ZxMin)/PixelWidth;
      unsigned int iy = (ZyMax - cimag(z))/PixelHeight;
      unsigned int i = Give_i(ix,iy); /* index of _data array */
    	
    	
      A[i]= 0; //255-A[i]; // Mark point with inveres color
    	
    	
      return 0;
    	
    }
    
    
    
    
    
    
    int IsInsideCircle (int x, int y, int xcenter, int ycenter, int r){
    
    	
      double dx = x- xcenter;
      double dy = y - ycenter;
      double d = sqrt(dx*dx+dy*dy);
      if (d<r) {    return 1;}
      return 0;
    	  
    
    } 
    
    // Big point = disk 
    int PlotBigPoint(const complex double z, unsigned char A[]){
    
    	
      unsigned int ix_seed = (creal(z)-ZxMin)/PixelWidth;
      unsigned int iy_seed = (ZyMax - cimag(z))/PixelHeight;
      unsigned int i;
    	
    	
      /* mark seed point by big pixel */
      int iSide =3.0*iWidth/2000.0 ; /* half of width or height of big pixel */
      int iY;
      int iX;
      for(iY=iy_seed-iSide;iY<=iy_seed+iSide;++iY){ 
        for(iX=ix_seed-iSide;iX<=ix_seed+iSide;++iX){ 
          if (IsInsideCircle(iX, iY, ix_seed, iy_seed, iSide)) {
    	i= Give_i(iX,iY); /* index of _data array */
    	if ( i< iSize) 
    	  {A[i]= 0;} //255-A[i];}
    	else {printf(" bad point i= %d\n", i);}
          }
         
    	
        }}
    	
    	
      return 0;
    	
    }
    
    
    
    int PlotAllPoints(const complex double zz[], int kMax, unsigned char A[]){
    
      int k;
    	
    	
      printf("kMax = %d \n",kMax);
    	
    
      for (k = 0; k < kMax; ++k)
        {
          //fprintf(stderr, "z = %+f %+f \n", creal(zz[k]),cimag(zz[k]));
          PlotBigPoint(zz[k], A);}
      return 0;
    
    
    
    
    
    }
    
    
    
    
    int DrawForwardOrbit(const complex double z0, const unsigned long long int iMax,  unsigned char A[] )
    {
      
      unsigned long long int i; /* nr of point of critical orbit */
      complex double z = z0;
      printf("draw forward orbit \n");
     
      PlotBigPoint(z, A);
      
      /* forward orbit of critical point  */
      for (i=1;i<iMax ; ++i)
        {
          z  = f(z);
          fprintf (stdout,"zn= %.16f %+.16f*I \n", creal(z), cimag(z));
          if (cabs2(z ) > 1000000) {fprintf (stdout,"escaping\n"); return 1;} // escaping
          PlotBigPoint(z, A);
        }
      
      fprintf (stdout,"first point of the orbit z0= %.16f %+.16f*I \n", creal(z0), cimag(z0));
      fprintf (stdout,"last point of the orbit z= %.16f %+.16f*I \n", creal(z), cimag(z));
       
      return 0;
     
    }
    
    
    
    // ***********************************************************************************************
    // ********************** draw line segment ***************************************
    // ***************************************************************************************************
    
    
    
    
    // plots raster point (ix,iy) 
    int iDrawPoint(unsigned int ix, unsigned int iy, unsigned char iColor, unsigned char A[])
    { 
    
      /* i =  Give_i(ix,iy) compute index of 1D array from indices of 2D array */
      A[Give_i(ix,iy)] = iColor;
    
      return 0;
    }
    
    
    
    /*
      http://rosettacode.org/wiki/Bitmap/Bresenham%27s_line_algorithm
      Instead of swaps in the initialisation use error calculation for both directions x and y simultaneously:
    */
    void iDrawLine( int x0, int y0, int x1, int y1, unsigned char iColor, unsigned char A[]) 
    {
      int x=x0; int y=y0;
      int dx = abs(x1-x0), sx = x0<x1 ? 1 : -1;
      int dy = abs(y1-y0), sy = y0<y1 ? 1 : -1; 
      int err = (dx>dy ? dx : -dy)/2, e2;
    
      for(;;){
        iDrawPoint(x, y, iColor, A);
        if (x==x1 && y==y1) break;
        e2 = err;
        if (e2 >-dx) { err -= dy; x += sx; }
        if (e2 < dy) { err += dx; y += sy; }
      }
    }
    
    
    
    
    int dDrawLineSegment(double complex Z0, double complex Z1, int color, unsigned char *array) 
    {
    
      double Zx0 = creal(Z0);
      double Zy0 = cimag(Z0);
      double Zx1 = creal(Z1);
      double Zy1 = cimag(Z1);
      unsigned int ix0, iy0; // screen coordinate = indices of virtual 2D array 
      unsigned int ix1, iy1; // screen coordinate = indices of virtual 2D array
    
      // first step of clipping
      //if (  Zx0 < ZxMax &&  Zx0 > ZxMin && Zy0 > ZyMin && Zy0 <ZyMax 
      //  && Zx1 < ZxMax &&  Zx1 > ZxMin && Zy1 > ZyMin && Zy1 <ZyMax )
       	
      ix0= (Zx0- ZxMin)/PixelWidth; 
      iy0 = (ZyMax - Zy0)/PixelHeight; // inverse Y axis 
      ix1= (Zx1- ZxMin)/PixelWidth; 
      iy1= (ZyMax - Zy1)/PixelHeight; // inverse Y axis 
       	
      // second step of clipping
      if (ix0 >=ixMin && ix0<=ixMax && ix0 >=ixMin && ix0<=ixMax && iy0 >=iyMin && iy0<=iyMax && iy1 >=iyMin && iy1<=iyMax )
        iDrawLine(ix0,iy0,ix1,iy1,color, array) ;
    
      return 0;
    }
    
    
    
    
    int DrawAttractors(const complex double zpa[], const complex double zpb[], int kMax, unsigned char A[]){
    	
      PlotAllPoints(zpa, period, A);
      dDrawLineSegment(zpa[0], zpa[1],0,A);
    	
      PlotAllPoints(zpb, period, A);
      dDrawLineSegment(zpb[0], zpb[1],0,A);
    	
    
      return 0;
    
    }
    
    
    
    
    
    
    // ***********************************************************************************************
    // ********************** edge detection usung Sobel filter ***************************************
    // ***************************************************************************************************
    
    // from Source to Destination
    int ComputeBoundaries(unsigned char S[], unsigned char D[])
    {
     
      unsigned int iX,iY; /* indices of 2D virtual array (image) = integer coordinate */
      unsigned int i; /* index of 1D array  */
      /* sobel filter */
      unsigned char G, Gh, Gv; 
      // boundaries are in D  array ( global var )
     
      // clear D array
      memset(D, iColorOfBasin1, iSize*sizeof(*D)); // for heap-allocated arrays, where N is the number of elements = FillArrayWithColor(D , iColorOfBasin1);
     
      // printf(" find boundaries in S array using  Sobel filter\n");   
    #pragma omp parallel for schedule(dynamic) private(i,iY,iX,Gv,Gh,G) shared(iyMax,ixMax)
      for(iY=1;iY<iyMax-1;++iY){ 
        for(iX=1;iX<ixMax-1;++iX){ 
          Gv= S[Give_i(iX-1,iY+1)] + 2*S[Give_i(iX,iY+1)] + S[Give_i(iX-1,iY+1)] - S[Give_i(iX-1,iY-1)] - 2*S[Give_i(iX-1,iY)] - S[Give_i(iX+1,iY-1)];
          Gh= S[Give_i(iX+1,iY+1)] + 2*S[Give_i(iX+1,iY)] + S[Give_i(iX-1,iY-1)] - S[Give_i(iX+1,iY-1)] - 2*S[Give_i(iX-1,iY)] - S[Give_i(iX-1,iY-1)];
          G = sqrt(Gh*Gh + Gv*Gv);
          i= Give_i(iX,iY); /* compute index of 1D array from indices of 2D array */
          if (G==0) {D[i]=255;} /* background */
          else {D[i]=0;}  /* boundary */
        }
      }
     
       
     
      return 0;
    }
    
    
    
    // copy from Source to Destination
    int CopyBoundaries(unsigned char S[],  unsigned char D[])
    {
     
      unsigned int iX,iY; /* indices of 2D virtual array (image) = integer coordinate */
      unsigned int i; /* index of 1D array  */
     
     
      //printf("copy boundaries from S array to D array \n");
      for(iY=1;iY<iyMax-1;++iY)
        for(iX=1;iX<ixMax-1;++iX)
          {i= Give_i(iX,iY); if (S[i]==0) D[i]=0;}
     
     
     
      return 0;
    }
    
    
    
    
    
    
    
    // FillAllArrayWithColor
    //memset (data, 255, sizeof (unsigned char ) * iSize);
    
    
    
    
    
    
    
    
    // *******************************************************************************************
    // ********************************** save A array to pgm file ****************************
    // *********************************************************************************************
    
    int SaveArray2PGMFile (unsigned char A[],  char * n, char *comment)
    {
    
      FILE *fp;
      const unsigned int MaxColorComponentValue = 255;	/* color component is coded from 0 to 255 ;  it is 8 bit color file */
      char name[100];		/* name of file */
      snprintf (name, sizeof name, "%.1f_%d_%s", radius, iHeight, n );	/* radius and iHeght are global variables */
      char *filename = strcat (name, ".pgm");
      char long_comment[200];
      sprintf (long_comment, "Julia set f(z) := 1/(z^3 + a*z + b)  Location by Michael Becker %s", comment);
    
    
    
    
    
      // save image array to the pgm file 
      fp = fopen (filename, "wb");	// create new file,give it a name and open it in binary mode 
      fprintf (fp, "P5\n # %s\n %u %u\n %u\n", long_comment, iWidth, iHeight, MaxColorComponentValue);	// write header to the file
      size_t rSize = fwrite (A, sizeof(A[0]), iSize, fp);	// write whole array with image data bytes to the file in one step 
      fclose (fp);
    
      // info 
      if ( rSize == iSize) 
        {
          printf ("File %s saved ", filename);
          if (long_comment == NULL || strlen (long_comment) == 0)
    	printf ("\n");
          else { printf (". Comment = %s \n", long_comment); }
        }
      else {printf("wrote %zu elements out of %llu requested\n", rSize,  iSize);}
    
      return 0;
    }
    
    
    
    
    int PrintCInfo ()
    {
    
      printf ("gcc version: %d.%d.%d\n", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);	// https://stackoverflow.com/questions/20389193/how-do-i-check-my-gcc-c-compiler-version-for-my-eclipse
      // OpenMP version is displayed in the console : export  OMP_DISPLAY_ENV="TRUE"
    
      printf ("__STDC__ = %d\n", __STDC__);
      printf ("__STDC_VERSION__ = %ld\n", __STDC_VERSION__);
      printf ("c dialect = ");
      switch (__STDC_VERSION__)
        {				// the format YYYYMM 
        case 199409L:
          printf ("C94\n");
          break;
        case 199901L:
          printf ("C99\n");
          break;
        case 201112L:
          printf ("C11\n");
          break;
        case 201710L:
          printf ("C18\n");
          break;
          //default : /* Optional */
    
        }
    
      return 0;
    }
    
    
    int
    PrintProgramInfo ()
    {
    
    
      // display info messages
      printf ("Numerical approximation of Julia set for F(z) =  ) \n");
      //printf ("parameter C = ( %.16f ; %.16f ) \n", creal (C), cimag (C));
      
    
      printf ("Image Width = %f in world coordinate\n", ZxMax - ZxMin);
      printf ("PixelWidth = %.16f \n", PixelWidth);
      printf ("AR = %.16f = %.16f *PixelWidth = %.16f %% of ImageWidth \n", AR1, AR1 / PixelWidth, AR1 /( ZxMax - ZxMin));
      fprintf(stdout, "AR1  = %f = %d * pixeWidth \n",  AR1, (int) (AR1/PixelWidth));
    
    
      // image corners in world coordinate
      // center and radius
      // center and zoom
      // GradientRepetition
      printf ("Maximal number of iterations = iterMax = %d \n", IterMax);
      printf ("ratio of image  = %f ; it should be 1.000 ...\n", ratio);
      //
    
    
    
    
      return 0;
    }
    
    
    
    int SetPlane(complex double center, double radius, double a_ratio){
    
      ZxMin = creal(center) - radius*a_ratio;	
      ZxMax = creal(center) + radius*a_ratio;	//0.75;
      ZyMin = cimag(center) - radius;	// inv
      ZyMax = cimag(center) + radius;	//0.7;
      return 0;
    
    }
    
    
    
    // Check Orientation of z-plane image : mark first quadrant of complex plane 
    // it should be in the upper right position
    // uses global var :  ...
    int CheckZPlaneOrientation(unsigned char A[] )
    {
     
      double Zx, Zy; //  Z= Zx+ZY*i;
      unsigned i; /* index of 1D array */
      unsigned int ix, iy;		// pixel coordinate 
    	
      fprintf(stderr, "compute image CheckOrientation\n");
      // for all pixels of image 
    #pragma omp parallel for schedule(dynamic) private(ix,iy, i, Zx, Zy) shared(A, ixMax , iyMax) 
      for (iy = iyMin; iy <= iyMax; ++iy){
        //fprintf (stderr, " %d from %d \r", iy, iyMax);	//info 
        for (ix = ixMin; ix <= ixMax; ++ix){
          // from screen to world coordinate 
          Zy = GiveZy(iy);
          Zx = GiveZx(ix);
          i = Give_i(ix, iy); /* compute index of 1D array from indices of 2D array */
          if (Zx>0 && Zy>0) A[i]=255-A[i];   // check the orientation of Z-plane by marking first quadrant */
        }
      }
       
       
      return 0;
    }
    
    
    
    
    
    
    
    // *****************************************************************************
    //;;;;;;;;;;;;;;;;;;;;;;  setup ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    // **************************************************************************************
    
    int setup ()
    {
    
      fprintf (stderr, "setup start\n");
    
    
    
    
    
    
      /* 2D array ranges */
    
      iWidth = iHeight* DisplayAspectRatio ;
      iSize = iWidth * iHeight;	// size = number of points in array 
      // iy
      iyMax = iHeight - 1;		// Indexes of array starts from 0 not 1 so the highest elements of an array is = array_name[size-1].
      //ix
    
      ixMax = iWidth - 1;
    
      /* 1D array ranges */
      // i1Dsize = i2Dsize; // 1D array with the same size as 2D array
      iMax = iSize - 1;		// Indexes of array starts from 0 not 1 so the highest elements of an array is = array_name[size-1].
    
      
      SetPlane( center, radius,  DisplayAspectRatio );	
      /* Pixel sizes */
      PixelWidth = (ZxMax - ZxMin) / ixMax;	//  ixMax = (iWidth-1)  step between pixels in world coordinate 
      PixelHeight = (ZyMax - ZyMin) / iyMax;
      ratio = ((ZxMax - ZxMin) / (ZyMax - ZyMin)) / ((double) iWidth / (double) iHeight);	// it should be 1.000 ...
      zcr1 = z_cr[0];
      zcr2 = z_cr[1];
        
      
      // LSM  
      // escape radius ( of circle around infinity 
      ER = 200.0; // 
      ER2 = ER*ER;
      
      
      /* 
      
         attracting radius of circle arounf finite attractor
         there are 2 basins so 2 
      
      
         It would have to be done separately in each basin.
    
         A suggested method:
    
         For each critical point, forward iterate to find an attractor and then thin out the critical point set to only one per basin by removing all but one that converge to a common attractor, for each attractor.
         For each pixel, calculate a smoothed iteration value (e.g. using the methods in my GVC coloring ucl) and note which basin it is in.
         For each critical point in the reduced set, calculate a smoothed iteration value using the same method as in step 2.
         For each pixel, subtract from its smoothed iteration value the one found in step 3 for the critical point that shares its basin. Note that the critical point itself, if inside the image rectangle and in a pixel center, will end up with zero and some points may end up with negative values.
         The level set boundaries you want will now be the boundaries where the sign or the integer part of the modified smoothed iteration value changes. In particular, the -0.something to +0.something transition will pass through the critical point, the n.something to (n+1).something transitions for nonnegative n will pass through its images, and the same for negative n will pass through its preimages.
    
         pauldebrot 
         https://fractalforums.org/programming/11/crtical-points-and-level-curves/4323/msg29514#new
      
      
         AR_max = 5*PixelWidth*iWidth/2000.0 ; // adjust first number 
         GiveTunedAR(const int i_Max, const complex double zcr, const double c, const double zp){
      */
      //AR1 = 20*PixelWidth; // 0.03; // 10*0.0006 = 0.006
      
      AR1 = GiveTunedAR1(14); 
      AR1_2 = AR1 * AR1;
      //
      // AR2 = GiveTunedAR2(50); 
      // AR2 = AR1;
      // AR2_2 = AR2 * AR2;
      
      //AR12 = AR/2.0;
      
      
     
      
      
      // DEM
      BoundaryWidth = 0.5*iWidth/2000.0  ; //  measured in pixels ( when iWidth = 2000) 
      distanceMax = BoundaryWidth*PixelWidth;
    
    
    
      /* create dynamic 1D arrays for colors ( shades of gray ) */
      data = malloc (iSize * sizeof (unsigned char));
    
      edge = malloc (iSize * sizeof (unsigned char));
      if (data == NULL || edge == NULL)
        {
          fprintf (stderr, " Could not allocate memory");
          return 1;
        }
      
    
    
    
    
     
    
    
      fprintf (stderr, " end of setup \n");
    
      return 0;
    
    }				// ;;;;;;;;;;;;;;;;;;;;;;;;; end of the setup ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    
    
    
    int end ()
    {
    
    
      fprintf (stderr, " allways free memory (deallocate )  to avoid memory leaks \n");	// https://en.wikipedia.org/wiki/C_dynamic_memory_allocation
      free (data);
      free(edge);
    
    
      PrintProgramInfo ();
      PrintCInfo ();
      return 0;
    
    }
    
    // ********************************************************************************************************************
    /* -----------------------------------------  main   -------------------------------------------------------------*/
    // ********************************************************************************************************************
    
    int main ()
    {
      setup ();
      
      /*  
       
       */
       
      DrawImage (data, Fatou_ab);	 
      SaveArray2PGMFile (data,  "Fatou_ab" , "Fatou_ab ");
      /*
        DrawImage (data, Fatou_abi);	 
        SaveArray2PGMFile (data,  "Fatou_abi" , "Fatou_abi ");
        
      */ 
      ComputeBoundaries(data,edge);
      SaveArray2PGMFile (edge,  "Fatou_ab_LCM" , "Fatou_ab_LCM ");
        
      CopyBoundaries(edge, data);
      SaveArray2PGMFile (data,  "Fatou_ab_LSCM" , "Fatou_ab_LSCM");
        
      /*
        DrawAttractors(zpa, zpb, 2,data);
        SaveArray2PGMFile (data,  "Fatou_abi_LSCM_zp" , "Fatou_abi_LSCM_zp");
        
        DrawForwardOrbit(zcr1, 2000,  data);
        DrawForwardOrbit(zcr2, 2000,  data);
        SaveArray2PGMFile (data,  "Fatou_abi_LSCM_zp_cr" , "Fatou_abi_LSCM_zp_cr");
        
        
      */
       
        
      
      
      DrawImage (data, LSM);	
      SaveArray2PGMFile (data,  "LSM" , "LSM");
      
      ComputeBoundaries(data,edge);
      SaveArray2PGMFile (edge,  "LCM" , "LCM ");
        
      PlotBigPoint(zcr1, edge);
      //PlotBigPoint(zcr2, edge);
      SaveArray2PGMFile (edge,  "LCM_cr" , "LCM_cr ");
      DrawForwardOrbit(zcr1, 50,  edge);
      SaveArray2PGMFile (edge,  "LCM_cr_o" , "LCM_cr_o ");
        
      CopyBoundaries(edge, data);
      SaveArray2PGMFile (data,  "LSCM" , "LSCM");
        
       
      /*
        DrawAttractors(zpa, zpb, 2,edge);
        
        DrawForwardOrbit(zcr1, 2000,  edge);
        DrawForwardOrbit(zcr2, 2000,  edge);
        SaveArray2PGMFile (edge,  "LSCM_zp_cr" , "LSM + LCM + critical orbit + periodic points");
        
            
          
        DrawImage (data, LSM_m);	 
        SaveArray2PGMFile (data,  "LSM_m" , "LSM_m ");
      
        ComputeBoundaries(data,edge);
        SaveArray2PGMFile (edge,  "LCM_m" , "LCM_m ");
      
        CopyBoundaries(edge, data);
        SaveArray2PGMFile (data,  "LSCM_m" , "LSCM m");
    
      
        DrawImage (data, DEM);	// first 
        SaveArray2PGMFile (data,  "DEM" , "DEM ");
      */   
    
      
      end ();
    
      return 0;
    }
    

    bash source code

    #!/bin/bash 
     
    # script file for BASH 
    # which bash
    # save this file as d.sh
    # chmod +x d.sh
    # ./d.sh
    # checked in https://www.shellcheck.net/
    
    
    
    
    printf "make pgm files \n"
    gcc d.c -lm -Wall -march=native -fopenmp
    
    if [ $? -ne 0 ]
    then
        echo ERROR: compilation failed !!!!!!
        exit 1
    fi
    
    
    export  OMP_DISPLAY_ENV="TRUE"
    printf "display OMP info \n"
    
    printf "run the compiled program\n"
    time ./a.out > a.txt
    
    export  OMP_DISPLAY_ENV="FALSE"
    
    printf "change Image Magic settings\n"
    export MAGICK_WIDTH_LIMIT=100MP
    export MAGICK_HEIGHT_LIMIT=100MP
    
    printf "convert all pgm files to png using Image Magic v 6 convert \n"
    # for all pgm files in this directory
    for file in *.pgm ; do
      # b is name of file without extension
      b=$(basename "$file" .pgm)
      # convert  using ImageMagic
      convert "${b}".pgm -resize 2000x2000 "${b}".png
      echo "$file"
    done
    
    
    printf "delete all pgm files \n"
    rm ./*.pgm
    
     
    echo OK
    
    printf "info about software \n"
    bash --version
    make -v
    gcc --version
    convert -version
    convert -list resource
    # end
    


    make

    all: 
    	chmod +x d.sh
    	./d.sh
    


    Tu run the program simply

     make
    


    text output

    
    chmod +x d.sh
    ./d.sh
    make pgm files 
    d.c: In function ‘GiveTunedAR1’:
    d.c:441:10: warning: unused variable ‘t’ [-Wunused-variable]
      441 |   double t;
          |          ^
    d.c: In function ‘GiveTunedAR2’:
    d.c:484:10: warning: unused variable ‘r’ [-Wunused-variable]
      484 |   double r = 10 * PixelWidth; // initial value
          |          ^
    d.c: In function ‘PlotBigPoint’:
    d.c:926:35: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 2 has type ‘unsigned int’ [-Wformat=]
      926 |    else {printf(" bad point i= %lld\n", i);}
          |                                ~~~^     ~
          |                                   |     |
          |                                   |     unsigned int
          |                                   long long int
          |                                %d
    d.c: In function ‘GiveTunedAR2’:
    d.c:505:65: warning: ‘t’ is used uninitialized in this function [-Wuninitialized]
      505 | rintf(stdout, "  AR2 = %f = %d * pixeWidth \n",  t, (int) (t/PixelWidth));
          |                                                           ~~^~~~~~~~~~~~
    
    display OMP info 
    run the compiled program
    
    OPENMP DISPLAY ENVIRONMENT BEGIN
      _OPENMP = '201511'
      OMP_DYNAMIC = 'FALSE'
      OMP_NESTED = 'FALSE'
      OMP_NUM_THREADS = '8'
      OMP_SCHEDULE = 'DYNAMIC'
      OMP_PROC_BIND = 'FALSE'
      OMP_PLACES = ''
      OMP_STACKSIZE = '0'
      OMP_WAIT_POLICY = 'PASSIVE'
      OMP_THREAD_LIMIT = '4294967295'
      OMP_MAX_ACTIVE_LEVELS = '1'
      OMP_CANCELLATION = 'FALSE'
      OMP_DEFAULT_DEVICE = '0'
      OMP_MAX_TASK_PRIORITY = '0'
      OMP_DISPLAY_AFFINITY = 'FALSE'
      OMP_AFFINITY_FORMAT = 'level %L thread %i affinity %A'
      OMP_ALLOCATOR = 'omp_default_mem_alloc'
      OMP_TARGET_OFFLOAD = 'DEFAULT'
    OPENMP DISPLAY ENVIRONMENT END
    setup start
     end of setup 
    compute image 0 
     19999 from 19999 
    compute image 3 
     19999 from 19999 
     allways free memory (deallocate )  to avoid memory leaks 
    
    real	1m30,150s
    user	10m58,023s
    sys	0m5,800s
    change Image Magic settings
    convert all pgm files to png using Image Magic v 6 convert 
    3.0_20000_Fatou_ab_LCM.pgm
    3.0_20000_Fatou_ab_LSCM.pgm
    3.0_20000_Fatou_ab.pgm
    3.0_20000_LCM_cr_o.pgm
    3.0_20000_LCM_cr.pgm
    3.0_20000_LCM.pgm
    3.0_20000_LSCM.pgm
    3.0_20000_LSM.pgm
    delete all pgm files 
    OK
    
    
    
    
    info about software 
    GNU bash, wersja 5.1.4(1)-release (x86_64-pc-linux-gnu)
    Copyright (C) 2020 Free Software Foundation, Inc.
    Licencja GPLv3+: GNU GPL wersja 3 lub późniejsza <http://gnu.org/licenses/gpl.html>
    
    To oprogramowanie jest wolnodostępne; można je swobodnie zmieniać i rozpowszechniać.
    Nie ma ŻADNEJ GWARANCJI w granicach dopuszczanych przez prawo.
    GNU Make 4.3
    Ten program został zbudowany dla systemu x86_64-pc-linux-gnu
    Copyright (C) 1988-2020 Free Software Foundation, Inc.
    Licencja GPLv3+: GNU GPL wersja 3 lub nowsza <http://gnu.org/licenses/gpl.html>
    To oprogramowanie jest wolnodostępne: można je swobodnie zmieniać i rozpowszechniać.
    Nie ma ŻADNEJ GWARANCJI w zakresie dopuszczalnym przez prawo.
    gcc (Ubuntu 10.3.0-1ubuntu1) 10.3.0
    Copyright (C) 2020 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    Version: ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagick.org
    Copyright: (C) 1999-2021 ImageMagick Studio LLC
    License: https://imagemagick.org/script/license.php
    Features: Cipher DPC Modules OpenMP(4.5) 
    Delegates (built-in): bzlib djvu fftw fontconfig freetype heic jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png tiff webp wmf x xml zlib
    Resource limits:
      Width: 1MP
      Height: 1MP
      List length: unlimited
      Area: 128MP
      Memory: 256MiB
      Map: 512MiB
      Disk: 10GiB
      File: 768
      Thread: 8
      Throttle: 0
      Time: unlimited
    
    


     GiveTunedAR1
    AR1  = 1.189207 = 396 * pixeWidth 
    AR1  = 0.776625 = 258 * pixeWidth 
    AR1  = 0.647126 = 215 * pixeWidth 
    AR1  = 0.561632 = 187 * pixeWidth 
    AR1  = 0.495852 = 165 * pixeWidth 
    AR1  = 0.440671 = 146 * pixeWidth 
    AR1  = 0.391508 = 130 * pixeWidth 
    AR1  = 0.345585 = 115 * pixeWidth 
    AR1  = 0.300924 = 100 * pixeWidth 
    AR1  = 0.255870 = 85 * pixeWidth 
    AR1  = 0.208833 = 69 * pixeWidth 
    AR1  = 0.158195 = 52 * pixeWidth 
    AR1  = 0.102821 = 34 * pixeWidth 
    AR1  = 0.045690 = 15 * pixeWidth 
    AR1  = 0.006274 = 2 * pixeWidth 
    final AR1  = 0.006274 = 2 * pixeWidth 
    File 3.0_2000_Fatou_ab.pgm saved . Comment = Julia set f(z) := 1/(z^3 + a*z + b)  Location by Michael Becker Fatou_ab  
    File 3.0_2000_Fatou_ab_LCM.pgm saved . Comment = Julia set f(z) := 1/(z^3 + a*z + b)  Location by Michael Becker Fatou_ab_LCM  
    File 3.0_2000_Fatou_ab_LSCM.pgm saved . Comment = Julia set f(z) := 1/(z^3 + a*z + b)  Location by Michael Becker Fatou_ab_LSCM 
    File 3.0_2000_LSM.pgm saved . Comment = Julia set f(z) := 1/(z^3 + a*z + b)  Location by Michael Becker LSM 
    File 3.0_2000_LCM.pgm saved . Comment = Julia set f(z) := 1/(z^3 + a*z + b)  Location by Michael Becker LCM  
    File 3.0_2000_LCM_cr.pgm saved . Comment = Julia set f(z) := 1/(z^3 + a*z + b)  Location by Michael Becker LCM_cr  
    draw forward orbit 
    zn= 0.1137724651405569 -0.2746710283669525*I 
    zn= -0.7175079924687737 -0.2972015415916586*I 
    zn= 0.1353902001873419 -0.3268608575046892*I 
    zn= -0.5978663576226477 -0.2476443538139037*I 
    zn= 0.1546492826764221 -0.3733563956486887*I 
    zn= -0.5188804722980083 -0.2149273288763920*I 
    zn= 0.1735016289027061 -0.4188699855907366*I 
    zn= -0.4581076846815646 -0.1897544160224413*I 
    zn= 0.1930981582504890 -0.4661801925175965*I 
    zn= -0.4071268022263181 -0.1686374430877297*I 
    zn= 0.2145045687994337 -0.5178598391865853*I 
    zn= -0.3617057975966767 -0.1498234469535211*I 
    zn= 0.2390253277964610 -0.5770581881168905*I 
    zn= -0.3192789962293067 -0.1322496904190470*I 
    zn= 0.2685647632930078 -0.6483726939174985*I 
    zn= -0.2780172785207856 -0.1151585273373674*I 
    zn= 0.3062787888184625 -0.7394224058327360*I 
    zn= -0.2363927794332049 -0.0979170952883049*I 
    zn= 0.3580457354794985 -0.8643988705444532*I 
    zn= -0.1929364490431291 -0.0799168938697694*I 
    zn= 0.4364070915505956 -1.0535799191372424*I 
    zn= -0.1461533358546422 -0.0605386938970625*I 
    zn= 0.5735606464715790 -1.3846978915551613*I 
    zn= -0.0949943633277504 -0.0393479536393514*I 
    zn= 0.8794364906752937 -2.1231475030340827*I 
    zn= -0.0422124005561373 -0.0174849488106774*I 
    zn= 1.9751152968825285 -4.7683501369843091*I 
     bad point i= 5173655
     bad point i= 5173656
     bad point i= 5173657
     bad point i= 5173658
     bad point i= 5173659
     bad point i= 5175655
     bad point i= 5175656
     bad point i= 5175657
     bad point i= 5175658
     bad point i= 5175659
     bad point i= 5177655
     bad point i= 5177656
     bad point i= 5177657
     bad point i= 5177658
     bad point i= 5177659
     bad point i= 5179655
     bad point i= 5179656
     bad point i= 5179657
     bad point i= 5179658
     bad point i= 5179659
     bad point i= 5181655
     bad point i= 5181656
     bad point i= 5181657
     bad point i= 5181658
     bad point i= 5181659
    zn= -0.0057965932640307 -0.0024010275455220*I 
    zn= 14.3763936427321912 -34.7076845102973479*I 
     bad point i= 25125787
     bad point i= 25125788
     bad point i= 25125789
     bad point i= 25125790
     bad point i= 25125791
     bad point i= 25127787
     bad point i= 25127788
     bad point i= 25127789
     bad point i= 25127790
     bad point i= 25127791
     bad point i= 25129787
     bad point i= 25129788
     bad point i= 25129789
     bad point i= 25129790
     bad point i= 25129791
     bad point i= 25131787
     bad point i= 25131788
     bad point i= 25131789
     bad point i= 25131790
     bad point i= 25131791
     bad point i= 25133787
     bad point i= 25133788
     bad point i= 25133789
     bad point i= 25133790
     bad point i= 25133791
    zn= -0.0000173732412092 -0.0000071962321312*I 
    zn= 4796.6486124753673721 -11580.1341341750739957*I 
    escaping
    File 3.0_2000_LCM_cr_o.pgm saved . Comment = Julia set f(z) := 1/(z^3 + a*z + b)  Location by Michael Becker LCM_cr_o  
    File 3.0_2000_LSCM.pgm saved . Comment = Julia set f(z) := 1/(z^3 + a*z + b)  Location by Michael Becker LSCM 
    Numerical approximation of Julia set for F(z) =  ) 
    Image Width = 6.000000 in world coordinate
    PixelWidth = 0.0030015007503752 
    AR = 0.0062741873372543 = 2.0903500811952109 *PixelWidth = 0.0010456978895424 % of ImageWidth 
    AR1  = 0.006274 = 2 * pixeWidth 
    Maximal number of iterations = iterMax = 100000 
    ratio of image  = 1.000000 ; it should be 1.000 ...
    gcc version: 10.3.0
    __STDC__ = 1
    __STDC_VERSION__ = 201710
    c dialect = C18
    

    Maxima CAS src code

    
    /*
    
    f(z)=1/(z3+dz+c) mit c=0 und d=-3(1+i), dargestellt auf [-3;3]x[-3;3].
    https://web.archive.org/web/20161024194536/http://www.ijon.de/mathe/julia/some_julia_sets_3.html
    
    
    https://fractalforums.org/fractal-mathematics-and-new-theories/28/rational-function/4279/45
    
    
    The parameters used here differ slightly from the ones on the site, as I prefer working with exactly double-representable numbers by using a near dyadic fraction, hoping the overall structure of the set remains the same (i.e. intersecting Jordan curves).
    
    
    */
    kill(all);
    remvalue(all);
    display2d:false;
    
    
    
    /* map */
    a: -3-3*%i; /* d */
    c: 0.0;
    define(f(z), 1/(z^3+ a*z + c));
    
    
    /* first derivativa wrt z */
    define( d(z), diff(f(z),z,1));
    
    
    
    
    GiveOrbit(z0,iMax):=
       /* 
       computes (without escape test)
        (forward orbit of critical point )
       and saves it to the list for draw package */
    block(
     [z,orbit,temp],
     z:z0, /* first point = critical point z:0+0*%i */
     orbit:[[realpart(z),imagpart(z)]], 
     for i:1 thru iMax step 1 do
            ( z:f(z),
              z:float(z),
              z:rectform(z),
              z:float(z),
              if (cabs(z)>3) then break,
              /*if (cabs(z)< 0.00001) then break, */
              orbit:endcons([realpart(z),imagpart(z)],orbit)),
             
     return(orbit) 
    )$
    
    
    
            
            
            
    
    
    
    
    /* critical points 
    
    [-0.8366600265340756*%i,0.8366600265340756*%i]
    
    
    */
    
    s:solve(d(z)=0);
    s : map(rhs,s);
    s : map('float,s);
    s : map('rectform,s);
    
    
    
    
    
    
    orbits:[];
    for z in s do (
      	print(i,z),
      
      	orbit : GiveOrbit(z,30),
      	orbits:endcons(orbit,orbits)
      	
    
    )$
    
    
    
    
    path:"~/Dokumenty/ijon/3_b005/";
    
    
    plot2d(
      [[discrete, orbits[1]], [discrete, orbits[2]]], 
      [x,-1.5, 1.5], 
      [y,-1.5, 1.5],
      [yx_ratio, 1.0],
      [xlabel, "z.re"],
      [ylabel, "z.im"],
      [legend, "first", "second"],
      [title, "Critical orbits"] 
     );
    
      
    /*
    
    ceitical points
    s;
    
    (%o17) [-1.0*(0.4550898605622273*%i+1.098684113467809),
            0.4550898605622273*%i+1.098684113467809]
            
            
            
            period 2  cycle: (zero, infinity)
    
         
    
    */
    

    references

    1. Some Julia sets 3 by Michael Becker, 8/2003. Last modification: 8/2003.

    Captions

    Julia set f(z)=1 over z3+z*(-3-3*I)

    Items portrayed in this file

    depicts

    24 July 2021

    image/png

    701,208 byte

    2,000 pixel

    2,000 pixel

    e41a164df038340eed2b9fd071073199e9583ee3

    File history

    Click on a date/time to view the file as it appeared at that time.

    Date/TimeThumbnailDimensionsUserComment
    current19:22, 24 July 2021Thumbnail for version as of 19:22, 24 July 20212,000 × 2,000 (685 KB)Soul windsurferUploaded own work with UploadWizard

    The following page uses this file:

    Global file usage

    The following other wikis use this file:

    Metadata