ファイル:Julia set of f(z) = z^2 -1.2029905319213867188+0.14635562896728515625i.png

提供: testwiki
ナビゲーションに移動 検索に移動
    元のファイル (2,500 × 1,000 ピクセル、ファイルサイズ: 221キロバイト、MIME タイプ: image/png)

    このファイルはウィキメディア・コモンズのものであり、他のプロジェクトで使用されている可能性があります。 ウィキメディア・コモンズでのファイル解説ページにある説明を以下に示します。

    概要

    解説
    English: Julia set of f(z) = z^2 -1.2029905319213867188+0.14635562896728515625i. Angled internal adress : 1→1/22→2/510. Construction of polynomial (location) and precise description by Marc Meidlinger: "Parameters were found by a brute-force search, following the vector from the center of the period-2 bulb towards the center of an attached bulb, looking for c values with a repelling 2-cycle and an attracting cycle with multiplier close (>0.95) to 1 and taking the maximum found."[1]
    日付
    原典 投稿者自身による著作物
    作者 Adam majewski
    その他のバージョン

    ライセンス

    この作品の著作権者である私は、この作品を以下のライセンスで提供します。
    w:ja:クリエイティブ・コモンズ
    表示 継承
    このファイルはクリエイティブ・コモンズ 表示-継承 4.0 国際ライセンスのもとに利用を許諾されています。
    あなたは以下の条件に従う場合に限り、自由に
    • 共有 – 本作品を複製、頒布、展示、実演できます。
    • 再構成 – 二次的著作物を作成できます。
    あなたの従うべき条件は以下の通りです。
    • 表示 – あなたは適切なクレジットを表示し、ライセンスへのリンクを提供し、変更があったらその旨を示さなければなりません。これらは合理的であればどのような方法で行っても構いませんが、許諾者があなたやあなたの利用行為を支持していると示唆するような方法は除きます。
    • 継承 – もしあなたがこの作品をリミックスしたり、改変したり、加工した場合には、あなたはあなたの貢献部分を元の作品とこれと同一または互換性があるライセンスの下に頒布しなければなりません。

    c source code

    /*
    
    Construction of polynomial (location) and precise description by Marc Meidlinger
    
    
    spirals by marcm200
    
    
    c=-1.2029905319213867188 + 0.14635562896728515625 i
    c=-1.2255649566650390625 + 0.1083774566650390625 i
    c=-1.2256811857223510742 + 0.10814088582992553711 i
    c=-0.8422698974609375 -0.19476318359375 i
    
    The image below (point-sampled, numerical example, not rounding controlled) shows the spiral region.
    
    Parameters were found by a brute-force search, following the vector from the center of the period-2 bulb towards the center of an attached bulb, looking for c values with a repelling 2-cycle and an attracting cycle with multiplier close (>0.95) to 1 and taking the maximum found.
    
    https://fractalforums.org/fractal-mathematics-and-new-theories/28/julia-sets-true-shape-and-escape-time/2725/new#new
    ===================================
    
    
    
    
    coefficients read from input file spiral_marc.txt
    	degree 2 coefficient = ( +1.0000000000000000 +0.0000000000000000*i) 
    	degree 0 coefficient = ( -1.2029905319213867 +0.1463556289672852*i) 
    
    Input polynomial p(z)=(1+0i)*z^2+(-1.2029905319213867188+0.14635562896728515625i)
    
    1 critical points found
    
    	cp#0: 0,0 . It's critical orbit is bounded and enters cycle #0 length=10 and it's stability = |multiplier|=0.97933 =attractive 
    	internal angle = 0.98518727582877108073
    cycle = {
    0.070332335409042157082,-0.082438351560847222821 ; -1.2048399763253665462,0.13475946538219307769 ; 0.23048872312022861131,-0.17837155319411596155 ; -1.1816818914246747241,0.064130365893917712361 ; 0.18926885676992233343,-0.0052077551672771171809 ; -1.1671949524922755614,0.14438429723358875423 ; 0.13850669991442132734,-0.19069361693309327954 ; -1.2201704815392284686,0.09353094181499002624 ; 0.27707743502148707293,-0.08189175965914272104 ; -1.1329248872233710355,0.10097491153578244671 ; }
    
    ==============================================================
    
    
    
      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 ========================
      
      DrawImageOfX -> DrawPointOfX -> ComputeColorOfX 
      
      first 2 functions are identical for every X
      check only last function =  ComputeColorOfX
      which computes color of one pixel !
      
      
    
       
      ==========================================
    
      
      ---------------------------------
      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
    
      
      convert 12500_100000_1.pgm -resize 2500x1000 a.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 ------------------------------------------------------------ */
    
    
    
    // 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 = 5000;	//  
    // 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 = 0.8; 
    complex double center = 0.0;
    double AspectRatio = 2.5; // 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;
    
    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 AR; // bigger values do not works
    double AR2;
    double AR12;
    
    
    
    int IterMax = 100000;
    
    
    /* colors = shades of gray from 0 to 255 
    
     unsigned char colorArray[2][2]={{255,231},    {123,99}};
     color = 245;  exterior 
    */
    unsigned char iColorOfExterior = 245;
    unsigned char iColorOfInterior = 99;
    //unsigned char iColorOfInterior2 = 183;
    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;
    
    
    
    // periodic points = attractors
    complex double zp10 =0.13850669991442132734 - 0.19069361693309327954*I ; //period 10
    //complex double zp2= -0.33222664408882929266	+0.39454475039323866348*I ; // period 2
    
    
    
    complex double c = -1.2029905319213867188+0.14635562896728515625*I;
    
    /* ------------------------------------------ functions -------------------------------------------------------------*/
    
    
    
    
    
    //------------------complex numbers -----------------------------------------------------
    
    
    
    
    
    // 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;
    
    
    
    
    }
    
    
    
    double cabs2(complex double z){
    
    	return creal(z)*creal(z)+cimag(z)*cimag(z);
    
    
    }
    
    
    
    
    // =====================
    int IsPointInsideTrap(complex double  z){
    
    	
    	 
    	
    	if ( cabs2(z - zp10) < AR2) {return 1;} // circle with prabolic point zp on it's boundary
    	return 0; // outside
    
    
    
    }
    
    
    
    
    
    
    
    
    
    // ****************** DYNAMICS = trap tests ( target sets) ****************************
    
    
    /* -----------  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;
    }
    
    
    
    // f(z)=1+z−3z2−3.75z3+1.5z4+2.25z5
    unsigned char
    ComputeColor_Fatou (complex double z, int IterMax)
    {
    
    
    
    	
    	
    	
    
    
      	int i;			// number of iteration
      	for (i = 0; i < IterMax; ++i)
        	{
    
    
    		
    
          		z = z*z + c;		// complex iteration 
    		
          		if (cabs2(z) > ER2) // esaping = exterior
    		{
    	  		uExterior += 1;
    	  		return iColorOfExterior;
    		}			
    	
    	
    	
    		if ( IsPointInsideTrap(z)) {
    			uInterior +=1;
    			return iColorOfInterior; }
    	
    		
    
    	
    
        	}
    
      	uUnknown += 1;
      	return iColorOfUnknown;
    
    
    }
    
    
    
    
    
    // plots raster point (ix,iy) 
    int
    DrawFatouPoint (unsigned char A[], int ix, int iy, int IterMax)
    {
      int i;			/* index of 1D array */
      unsigned char iColor = 0;
      complex double z;
    
    
      i = Give_i (ix, iy);		/* compute index of 1D array from indices of 2D array */
      z = GiveZ (ix, iy);
      iColor = ComputeColor_Fatou (z, IterMax);
      A[i] = iColor;		// interior
    
      return 0;
    }
    
    
    
    
    // fill array 
    // uses global var :  ...
    // scanning complex plane 
    int
    DrawFatouImage (unsigned char A[], int IterMax)
    {
      unsigned int ix, iy;		// pixel coordinate 
    
      fprintf (stdout, "compute Fatou image \n");
      // 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)
    	DrawFatouPoint (A, ix, iy, IterMax);	//  
        }
    
      return 0;
    }
    
    
    //=========
    
    
    
    int IsInside (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;
    	  
    
    } 
    
    int PlotBigPoint(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 (IsInside(iX, iY, ix_seed, iy_seed, iSide)) {
          			i= Give_i(iX,iY); /* index of _data array */
          			A[i]= 255-A[i];}}}
    	
    	
    	return 0;
    	
    }
    
    
    // fill array 
    // uses global var :  ...
    // scanning complex plane 
    int MarkAttractors (unsigned char A[])
    {
      
    	
    	
    	
      	fprintf (stderr, "mark attractors \n");
      
      	PlotBigPoint(zp10, A); // period 10  cycle
        	// PlotBigPoint(zp2, A);	// period 2 attracting cycle
        		 
          	
    
      	return 0;
    }
    
    
    // =====================
    int IsPointInsideTraps(unsigned int ix, unsigned int iy){
    
    	
    	complex double  z = GiveZ (ix, iy);
    	
    	if ( IsPointInsideTrap(z)) {return 1;} // circle with prabolic point on it's boundary
    	
    	//if (IsPointInsideTrap2(z)) {return 1;}
    	
    	return 0; // outside
    
    
    
    }
    
    
    
    
    
    int MarkTraps(unsigned char A[]){
    
    	unsigned int ix, iy;		// pixel coordinate 
    	unsigned int i;
    
    
      	fprintf (stderr, "Mark traps \n");
      	// 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){
    			if (IsPointInsideTraps(ix, iy)) {
          				i= Give_i(ix,iy); /* index of _data array */
          				A[i]= 255-A[i]; // inverse color
          				}}}
      	return 0;
    }
    
    
    
    
    
    
    int PlotPoint(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]= 255-A[i]; // Mark point with inveres color
    	
    	
    	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, iColorOfExterior, iSize*sizeof(*D)); // for heap-allocated arrays, where N is the number of elements = FillArrayWithColor(D , iColorOfExterior);
     
      // 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;
    }
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    // *******************************************************************************************
    // ********************************** save A array to pgm file ****************************
    // *********************************************************************************************
    
    int
    SaveArray2PGMFile (unsigned char A[], int a, int b,  int c, 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, "%d_%d_%d", a, b, c );	/*  */
      char *filename = strcat (name, ".pgm");
      char long_comment[200];
      sprintf (long_comment, "f(z)=z^2 + c  c= %f %+f*i  %s",  creal(c), cimag(c), 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
      fwrite (A, iSize, 1, fp);	// write array with image data bytes to the file in one step 
      fclose (fp);
    
      // info 
      printf ("File %s saved ", filename);
      if (long_comment == NULL || strlen (long_comment) == 0)
        printf ("\n");
      else
        printf (". Comment = %s \n", long_comment);
    
      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)=z*z+c where c= %f %+f*i \n", creal(c), cimag(c));
      //printf ("iPeriodParent = %d \n", iPeriodParent);
      //printf ("iPeriodOfChild  = %d \n", iPeriodChild);
     
      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 = %f *PixelWidth\n", AR, AR / PixelWidth);
    
    
      printf("pixel counters\n");
      printf ("uUnknown = %llu\n", uUnknown);
      printf ("uExterior = %llu\n", uExterior);
      printf ("uInterior = %llu\n", uInterior);
      printf ("Sum of pixels  = %llu\n", uInterior+uExterior + uUnknown);
      printf ("all pixels of the array = iSize = %llu\n", iSize);
    
    
      // 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;
    
    }
    
    
    // *****************************************************************************
    //;;;;;;;;;;;;;;;;;;;;;;  setup ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    // **************************************************************************************
    
    int
    setup ()
    {
    
      fprintf (stderr, "setup start\n");
    
    
    
    
    
    
      /* 2D array ranges */
    
      iWidth = iHeight*AspectRatio;
      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, AspectRatio);	
      	/* 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 ...
    
      	ER = 2.0; // 
      	ER2 = ER*ER;
      	AR = PixelWidth*7.0*iWidth/2000.0 ; // 
      	AR2 = AR * AR;
      	
      
      
      	
    
      
      
    
    
    
      	/* 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 ();
    
    
      	DrawFatouImage (data, IterMax);	// first find Fatou
      	SaveArray2PGMFile (data, iWidth, IterMax, 0, "Fatou, name = iWidth_IterMax_n");
      
      	ComputeBoundaries(data,edge);
      	SaveArray2PGMFile (edge, iWidth, IterMax, 1, "Boundaries of Fatou; name = iWidth_IterMax_n"); 
      
      	CopyBoundaries(edge,data);
      	SaveArray2PGMFile (data, iWidth, IterMax, 2, "Fatou with boundaries; name = iWidth_IterMax_n"); 
      
      	//MarkAttractors(data);
      	MarkTraps(data);
      	SaveArray2PGMFile (data, iWidth, IterMax, 4, "Fatou with boundaries and traps; name = iWidth_IterMax_n"); 
    
      end ();
    
      return 0;
    }
    

    text output

    
    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 = '2147483647'
      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'
    OPENMP DISPLAY ENVIRONMENT END
    setup start
     end of setup 
    Mark traps 4999 
     allways free memory (deallocate )  to avoid memory leaks 
    
    
    compute Fatou image 
    File 12500_100000_0.pgm saved . Comment = f(z)=z^2 + c  c= 0.000000 +0.000000*i  Fatou, name = iWidth_IterMax_n 
    File 12500_100000_1.pgm saved . Comment = f(z)=z^2 + c  c= 1.000000 +0.000000*i  Boundaries of Fatou; name = iWidth_IterMax_n 
    File 12500_100000_2.pgm saved . Comment = f(z)=z^2 + c  c= 2.000000 +0.000000*i  Fatou with boundaries; name = iWidth_IterMax_n 
    File 12500_100000_4.pgm saved . Comment = f(z)=z^2 + c  c= 4.000000 +0.000000*i  Fatou with boundaries and traps; name = iWidth_IterMax_n 
    Numerical approximation of Julia set for f(z)=z*z+c where c= -1.202991 +0.146356*i 
    parameter c = ( -1.2029905319213867 ; 0.1463556289672852 ) 
    Image Width = 4.000000 in world coordinate
    PixelWidth = 0.0003200256020482 
    AR = 0.0140011200896072 = 43.750000 *PixelWidth
    pixel counters
    uUnknown = 0
    uExterior = 34478652
    uInterior = 5657608
    Sum of pixels  = 40136260
    all pixels of the array = iSize = 62500000
    Maximal number of iterations = iterMax = 100000 
    ratio of image  = 1.000000 ; it should be 1.000 ...
    gcc version: 9.3.0
    __STDC__ = 1
    __STDC_VERSION__ = 201710
    c dialect = C18
    
    
    
    
    real	0m9,833s
    user	1m11,079s
    sys	0m0,324s
    
    

    Image Magic src code

      convert 12500_100000_1.pgm -resize 2500x1000 a.png
    


    references

    1. ↑ fractalforums.org : julia-sets-true-shape-and-escape-time

    キャプション

    このファイルの内容を1行で記述してください
    Julia set of f(z) = z^2 -1.2029905319213867188+0.14635562896728515625i

    このファイルに描写されている項目

    題材

    8 9 2020

    226,063 バイト

    1,000 ピクセル

    2,500 ピクセル

    987216dd2f3f3ad9f9d26d8963d770801eadc3c2

    ファイルの履歴

    過去の版のファイルを表示するには、その版の日時をクリックしてください。

    日時サムネイル寸法利用者コメント
    現在の版2020年9月8日 (火) 16:242020年9月8日 (火) 16:24時点における版のサムネイル2,500 × 1,000 (221キロバイト)wikimediacommons>Soul windsurferUploaded own work with UploadWizard

    このファイルを使用しているページはありません。