File:Miimcr.png

From testwiki
Jump to navigation Jump to search
    Original file (1,000 × 1,000 pixels, file size: 18 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 Julia set and critical orbit for f(z)=z*z-0.11+0.65569999i; . Made in Maxima using MIIM. Code for finding period is based on code by JC Sprott[1]
    Source self-made, below
    Author Adam majewski

    Compare with

    Info

    Orbit of critical point tends to period 3 attracting cycle :

    • 0.17434140717278*%i-0.23080799291989
    • 0.57522120945524*%i-0.087122596659277
    • 0.55547045915754*%i-0.4332890929585

    Absolute value of multiplier of above cycle is 0.94840556944351

    Maxima source code

    /*  
    this is batch file for Maxima  5.13.0
    http://maxima.sourceforge.net/
    tested in wxMaxima 0.7.1
    using draw package ( interface to gnuplot )
    to draw on the screen
    ----------
    draws Julia set for f(z)=z*z+c
    using modified IIM
    modification: stop reversed iteration 
    if pixel was hit in reversed orbit  > HitLimit times
    ---
    draws also critical orbit 
    and finds period 
    Adam Majewski
    */
    c:-0.11+0.65569999*%i;      
    /* c:-0.2-0.7*%i;   */
    HitLimit:10; /* proportional to number of details and time of drawing */
    /* resolution is proportional to number of details and time of drawing */
    iXmax:1000;
    iYmax:1000;
    /* define image size : width:iXmax-0+1;      heght:iYmax-0+1 ;    */
    start:elapsed_run_time ();
    f(z,c):=z*z+c;
    finverseplus(z,c):=sqrt(z-c);
    finverseminus(z,c):=-sqrt(z-c);
    /* define z-plane ( dynamical ) */
    zxMin:-1.6;
    zxMax:1.6;
    zyMin:-1.6;
    zyMax:1.6;
    /* */
    PixelWidth:(zxMax-zxMin)/iXmax;
    PixelHeight:(zyMax-zyMin)/iYmax;
    /* 2D array of hits pixels . Hit > 0 means that point was in orbit */
    array(Hits,fixnum,iXmax,iYmax); 
    /* no hits for beginning */
    /* for iX:0 thru iXmax  step 1 do
    for iY:0 thru iYmax  step 1 do 
     Hits[iX,iY]:0; */
    /* compute fixed points of f(z,c) :   z=f(z,c)   */
    fixed:float(rectform(solve([z*z+c=z],[z])));
    /* Find which is repelling  */
    if (abs(2*rhs(fixed[1]))<1) 
     then block(
      beta:rhs(fixed[1]),
      alfa:rhs(fixed[2])
      ) 
     else block(
      alfa:rhs(fixed[1]),
      beta:rhs(fixed[2])
     );
    /* -----------  find period of orbit --------------------------------------*/
    z0:0;
    iMax:100;
    eps:0.01;
    /* first point */
    z:z0;
    orbit:[z];
    /* ------------------- compute forward orbit -----------------------------*/
    for i:1 thru iMax step 1 do
     block
     (
     z:f(z,c),
     orbit:endcons(z,orbit)
     /* disp(rectform(orbit[i])) */
     );
    IsEqual(c1,c2,eps):=
     if  abs(realpart(c1)-realpart(c2))<=eps and abs(imagpart(c1)-imagpart(c2))<=eps
      then true
      else false;
    GivePeriod(orbit,eps):=
     block
      (
      period:0,
      iLast:length(orbit),
      i:iLast,
      block
      (
      loop,
      i:i-1,
      if not IsEqual(orbit[iLast],orbit[i],eps) then go(loop),
      period:iLast-i	
      )
     );
    period:GivePeriod(orbit,eps);
    /*-------------- save orbit to draw it later on the screen ----------------------------- */
    /* save the z values to 2 lists */
    x0:makelist (realpart(z0), i, 1, 1); /* list of re(z) */
    y0:makelist (imagpart(z0), i, 1, 1); /* list of im(z) */
    for i:2 thru length(orbit) step 1 do
     block
     (
     x0:cons(realpart(orbit[i]),x0), 
     y0:cons(imagpart(orbit[i]),y0)
     );		   
    NumberOfPoints:0;		   
    /* choose repeller as a starting point */
    /*save beta in stack */
    stack:[beta];
    /* make 2 list of points and copy beta to  to lists */ 
    xx:makelist (realpart(beta), i, 1, 1); /* list of re(z) */
    yy:makelist (imagpart(beta), i, 1, 1); /* list of im(z) */
    NumberOfPoints:1;
    /* reversed iteration of beta */
    block
    (
     loop,
     /* pop = take one point from the stack */
     z:last(stack),
     stack:delete(z,stack),
     /*inverse iteration - first preimage (root) */
     z:finverseplus(z,c),
     /* translate from world to screen coordinate */
     iX:fix((realpart(z)-zxMin)/PixelWidth),
     iY:fix((imagpart(z)-zyMin)/PixelHeight),
     hit:Hits[iX,iY],
     if hit<HitLimit   
      then 
       block(
       Hits[iX,iY]:hit+1,
       stack:endcons(z,stack), /* push = add z at the end of list stack */
       if hit=0 then block( xx:cons(realpart(z),xx), yy:cons(imagpart(z),yy)),
       NumberOfPoints:NumberOfPoints+1
       ),
      /*inverse iteration - second preimage (root) */
      z:-z,
      /* translate from world to screen coordinate, coversion to integer */
      iX:fix((realpart(z)-zxMin)/PixelWidth),
      iY:fix((imagpart(z)-zyMin)/PixelHeight),
      hit:Hits[iX,iY],
      if hit<HitLimit   
       then 
        block(
         Hits[iX,iY]:hit+1,
         stack:endcons(z,stack), /* push = add z at the end of list stack to continue iteration */
         if hit=0 then block( xx:cons(realpart(z),xx), yy:cons(imagpart(z),yy)), /* draw point */
         NumberOfPoints:NumberOfPoints+1
        ),
      if is(not emptyp(stack)) then go(loop) 
    );
    stop:elapsed_run_time ();
    t:fix(stop-start);
    /* draw reversed orbit of beta  using draw package */
    load(draw);
    draw2d(
    file_name = "miimcr_",
    terminal  = 'png,
    pic_width  = iXmax,
    pic_height = iYmax,
    yrange = [zyMin,zyMax],
    xrange = [zxMin,zyMax],
    title= "Julia set in dynamical plane for f(z,c):=z*z+c drawn using MIIM",
    label ([concat("c=",string(c),";  Period=",string(period),". Resoution=",string(iXmax),
     " Time=",string(t),"HitLimit=",string(HitLimit)),0.0,-1.5]),
    xlabel     = "Z.re ",
    ylabel     = "Z.im",
    point_type    = filled_circle,
    point_size    = 0.3,
    color         = black,
    key = concat(string(NumberOfPoints)," points of Julia set."),
    points(xx,yy),
    color		  =red,
    point_size    = 0.3,
    key = concat("Points of critical orbit"),
    points(x0,y0)
    );
    

    References

    1. ↑ Mandelbrot Set Chaos by JC Sprott

    Licensing

    I, the copyright holder of this work, hereby publish it under the following licenses:
    GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
    w:en:Creative Commons
    attribution share alike
    This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International, 3.0 Unported, 2.5 Generic, 2.0 Generic and 1.0 Generic 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.
    You may select the license of your choice.

    Captions

    Add a one-line explanation of what this file represents

    Items portrayed in this file

    depicts

    18,571 byte

    1,000 pixel

    1,000 pixel

    image/png

    dfd06592da286f86e59af11ec966d53eec28f034

    File history

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

    Date/TimeThumbnailDimensionsUserComment
    current20:43, 5 March 2008Thumbnail for version as of 20:43, 5 March 20081,000 × 1,000 (18 KB)wikimediacommons>Soul windsurfer{{Information |Description= |Source=self-made |Date= |Author= Adam majewski |Permission= |other_versions= }}

    There are no pages that use this file.