File:Siegel quadratic 3,2,1000,1... ,.png

From testwiki
Jump to navigation Jump to search
    Original file (1,000 × 1,000 pixels, file size: 120 KB, MIME type: image/png)

    This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

    Summary

    Description
    English: Julia set of quadratic polynomial with Siegel disc for rotation number [3,2,1000,1...]
    Date
    Source own work inspired by images of quadratic polynomial Siegel disks by Davoud Cheraghi
    Author Adam majewski
    PNG development
    InfoField
     This PNG graphic was created with C.

    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 3.0 Unported 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.

    See also

    Summary

    rotation number

    rotation number t is :[1]

    t=[3,2,1000,1,...]=[0;3,2,1000,1…]=13+12+11000+11+⋱

    In Maxima CAS one can compute it :

    kill(all)$
    a: [0,3,2,1000,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]$
    t:float(cfdisrep(a))$
    l:%e^(2*%pi*%i*t)$
    c:(l*(1-l/2))/2$
    float(rectform(c))
    

    So

    t = .2857346725405882
    c = 0.113891513213121  +0.595978335936124 i
    

    How one can find limit of [3,2,1000,1,...] ?

    Here is explanation of Bill Wood

    "I don't know if Maxima knows much about the algebra of continued fractions, but it can be of some help hacking out the manipulation details of a derivation. A most useful fact is that

       [a1, a2, a3, ...] = a1 + 1/[a2, a3, ...]
    

    provided the continued fraction converges. If we apply that three times by hand to [3, 2, 1000, 1, 1, ...] we obtain

       3 + 1/(2 + 1/(1000 + 1/[1, 1, ...]))
    

    Now it is known that [1, 1, ...] converges to the Golden Ratio = (1+sqrt(5))/2. So now we can use Maxima as follows:

     (%i20) 3+(1/(2+(1/(1000+(1/((1+sqrt(5))/2))))));
                                        1
     (%o20)                    ---------------------- + 3
                                      1
                              ------------------ + 2
                                   2
                              ----------- + 1000
                              sqrt(5) + 1
     (%i21) factor(%o13);
                                  7003 sqrt(5) + 7017
     (%o21)                        -------------------
                                  2001 sqrt(5) + 2005
     (%i22) %o21,numer;
     (%o22)                         3.499750279196346
    

    You set a to [0, 3, 2, 1000, 1, 1, ...], which by our useful fact must be the reciprocal of [3, 2, 1000, 1, 1, ...], and indeed the reciprocal of 3.499750279196346 is 0.2857346725405882, which is what your float(t) evaluates to, so we seem to get consistent results.

    If all of the continued fractions for the rotation numbers exhibited on the link you provided do end up repeating 1 forever then the method I used above can be used to determine their limits as ratios of linear expressions in sqrt(5)." Bill Wood

    Centers of spirals

    "In this example there are 7 big spirals around the Julia set. I guess this is because the rotation number is approximately [3, 2, 0, 0 , 0, ....] = 2/7.

    I have checked that there is a 7-periodic point within each spiral, which will be slowly repelling. This shall be the center.

    Other spirals will have preperiodic centers with period 7 and any preperiod. Maybe there are other smaller spirals at the Siegel disk belonging to higher periods, which correspond to truncating the continued fraction expansion later. " (Wolf Jung )

    In program mandel[2]

    • press key b
    • input rotation number .2857346725405882
    • switch to dynamic plane ( F2 key)
    • increase iteration number ( key n ) up to 65 000
    • redraw
    • draw critical orbit ( key o) ( to draw full critical orbit, "you must recompile Mandel with a larger value of plotiter in calling drawOrbit() in qmnShell" )
    • find periodic point ( key x) for period 7
    • make forward iteraion of this point ( key f) to see that it is a periodic point
    z0=−0.291914002678583+0.478643728921302i
    z1=−0.029994521062735+0.316532722403284i
    z2=0.014598220154870+0.576989841117783i
    z3=−0.218812655508313+0.612824385391645i
    z4=−0.213783235906926+0.327790873680532i
    z5=0.052147928299711+0.455825948583758i
    z6=−0.091166375763210+0.643519093703911i
    z7=z0=−0.291914002678583+0.478643728921302i
    

    Angles of rays landing on period 7 orbit :

    9/127
    18/127
    36/127
    72/127
    144-127=17/127
    34/127
    68/127
    

    C src code

    /* 
       c console  program:
       1. draws Julia setfor Fc(z)=z*z +c
       using DEM/J algorithm ( Distance Esthimation Method for Julia set )
    
       
    
       http://www.warwick.ac.uk/~masiay/Research/Siegel.html
       -------------------------------         
       2. technic of creating ppm file is  based on the code of Claudio Rocchini
       http://en.wikipedia.org/wiki/Image:Color_complex_plot.jpg
       create 24 bit color graphic file ,  portable pixmap file = PPM 
       see http://en.wikipedia.org/wiki/Portable_pixmap
       to see the file use external application ( graphic viewer)
       ---------------------------------
       I think that creating graphic can't be simpler
       comments : Adam Majewski 
    
       gcc s.c -lm -Wall -march=native -O2
    
       it creates a.out file. Then run it :
    
       ./a.out
    
    file  s10000.ppm saved
    
     time ./a.out
    
    real	484m43.557s
    user	484m10.020s
    sys	0m10.110s
    
    Using Image Magic :
    convert s10000.ppm -resize 1000x1000 s10000.png
    
    */
    
    #include <stdio.h>
    #include <math.h>
    
    int GiveEscapeTimeJ(double _Zx0, double _Zy0,double C_x, double C_y, int iMax, double _ER2)
    { 
      int i;
      double Zx, Zy;
      double Zx2, Zy2; /* Zx2=Zx*Zx;  Zy2=Zy*Zy  */
     
      Zx=_Zx0; /* initial value of orbit  */
      Zy=_Zy0;
      Zx2=Zx*Zx;
      Zy2=Zy*Zy;
     
      for (i=0;i<iMax && ((Zx2+Zy2)<_ER2);i++)
        {
          Zy=2*Zx*Zy + C_y;
          Zx=Zx2-Zy2 +C_x;
          Zx2=Zx*Zx;
          Zy2=Zy*Zy;
        };
      return i;
    }
    
     
    
    /*
      estimates distance from point c to nearest point in Julia  set 
      for Fc(z)= z*z + c
      z(n+1) = Fc(zn)  
      this function is based on function  mndlbrot::dist  from  mndlbrot.cpp
      from program mandel by Wolf Jung (GNU GPL )
      http://www.mndynamics.com/indexp.html 
    
      Hyunsuk Kim  : 
      For Julia sets, z is the variable and c is a constant. Therefore df[n+1](z)/dz = 2*f[n]*f'[n] -- you don't add 1.
    
      For the Mandelbrot set on the parameter plane, you start at z=0 and c becomes the variable. df[n+1](c)/dc = 2*f[n]*f'[n] + 1. 
    
    */
    double jdist(double Zx, double Zy, double Cx, double Cy ,  int iter_max)
    { 
      int i;
      double x = Zx, /* Z = x+y*i */
        y = Zy, 
        /* Zp = xp+yp*1 = 1  */
        xp = 1, 
        yp = 0, 
        /* temporary */
        nz,  
        nzp,
        /* a = abs(z) */
        a; 
      for (i = 1; i <= iter_max; i++)
        { /* first derivative   zp = 2*z*zp  = xp + yp*i; */
          nz = 2*(x*xp - y*yp) ; 
          yp = 2*(x*yp + y*xp); 
          xp = nz;
          /* z = z*z + c = x+y*i */
          nz = x*x - y*y + Cx; 
          y = 2*x*y + Cy; 
          x = nz; 
          /* */
          nz = x*x + y*y; 
          nzp = xp*xp + yp*yp;
          if (nzp > 1e60 || nz > 1e60) break;
        }
      a=sqrt(nz);
      /* distance = 2 * |Zn| * log|Zn| / |dZn| */
      return 2* a*log(a)/sqrt(nzp); 
    }
    /* ------------------------------------------------------*/
    int main(void)
    { 
      const double Cx=0.113891513213121;
      const double Cy=0.595978335936124;
      /* screen ( integer) coordinate */
      int iX,iY;
      const int iXmax = 1000; 
      const int iYmax = 1000;
      /* world ( double) coordinate = parameter plane*/
      const double ZxMin=-1.5;
      const double ZxMax= 1.5;
      const double ZyMin=-1.5;
      const double ZyMax= 1.5;
      /* */
      double PixelWidth=(ZxMax-ZxMin)/iXmax;
      double PixelHeight=(ZyMax-ZyMin)/iYmax;
      /* color component ( R or G or B) is coded from 0 to 255 */
      /* it is 24 bit color RGB file */
      const int MaxColorComponentValue=255; 
      
      FILE * fp;
      char *filename="s1000.ppm";
      char *comment="# ";/* comment should start with # */
    
      static unsigned char color[3];
    
      double Zx0, Zy0;  /* Z0 = Zx0 + Zy0*i */
        
      /*  */
      int LastIteration;
      const int IterationMax=100000;
      /* bail-out value , radius of circle ;  */
      const int EscapeRadius=1/2 + sqrt(1/4+ sqrt(Cx*Cx + Cy*Cy));
      int ER2=EscapeRadius*EscapeRadius;
      double distanceMax=PixelWidth/10; /*jdist( 0,0,Cx,Cy, IterationMax);*/
     
    
     /*create new file,give it a name and open it in binary mode  */
      fp= fopen(filename,"wb"); /* b -  binary mode */
      /*write ASCII header to the file*/
      fprintf(fp,"P6\n %s\n %d\n %d\n %d\n",comment,iXmax,iYmax,MaxColorComponentValue);
    
      /* compute and write image data bytes to the file*/
      for(iY=0;iY<iYmax;++iY)
        {
          Zy0=ZyMax - iY*PixelHeight; /* reverse Y  axis */
          if (fabs(Zy0)<PixelHeight/2) Zy0=0.0; /*  */   
          printf("iY/iYmax =   %d / %d \n", iY, iYmax); 
          for(iX=0;iX<iXmax;++iX)
    	{    /* initial value of orbit Z0 */
    	  Zx0=ZxMin + iX*PixelWidth;
              if (Zx0*Zx0+Zy0*Zy0>ER2) LastIteration=0;
                else LastIteration = GiveEscapeTimeJ(Zx0, Zy0, Cx, Cy, 100, ER2);
                
    	  /* compute  pixel color (24 bit = 3 bytes) */
    	  if (LastIteration==IterationMax)
    	    { /*  interior of Julia set   */
    	      color[0]=0;/* this part of code does not work, I can't find the error */
    	      color[1]=255;
    	      color[2]=0;                           
    	    }
    	  else /* exterior of Filled-in Julia set  =  */
    	    {  double distance=jdist(Zx0,Zy0,Cx,Cy,IterationMax);
    	      if (distance<distanceMax)
    		{ /*  Julia set  = black */
    		  color[0]=0; /* Red*/
    		  color[1]=0;  /* Green */ 
    		  color[2]=0;/* Blue */
    		}
    	      else 
    		{ /*  exterior of Julia set  = white */
    		  color[0]=255;
    		  color[1]=255;
    		  color[2]=255;                           
    		};
    	    }
    	  /* check the orientation of Z-plane */
    	  /* mark first quadrant of cartesian plane*/     
    	  /*     if (Z0x>0 && Z0y>0) color[0]=255-color[0];  */
    	  /*write color to the file*/
    	  fwrite(color,1,3,fp);
    	}
        }
      fclose(fp);
      printf("file  %s saved\n", filename);
      
      return 0;
    }
    

    References

    1. ↑ Some examples of quadratic polynomial Siegel disks by Davoud Cheraghi
    2. ↑ Program mandel by Wolf Jung

    Captions

    Add a one-line explanation of what this file represents

    Items portrayed in this file

    depicts

    20 October 2011

    123,345 byte

    1,000 pixel

    1,000 pixel

    image/png

    589efead1ac429e9d12df6ace9958330bd94d055

    File history

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

    Date/TimeThumbnailDimensionsUserComment
    current20:24, 20 October 2011Thumbnail for version as of 20:24, 20 October 20111,000 × 1,000 (120 KB)wikimediacommons>Soul windsurfer

    There are no pages that use this file.