• February 25, 2021, 05:52:55 PM

Login with username, password and session length

Author Topic:  How many different ways are there to show such set ?  (Read 1595 times)

0 Members and 1 Guest are viewing this topic.


Offline Adam Majewski

  • Fractal Frogurt
  • ******
  • Posts: 450
Re: How many different ways are there to show such set ?
« Reply #31 on: January 13, 2021, 09:16:50 PM »

@saka

New method : blended gradient like in KFMovieMaker https://github.com/adammaj1/Mandelbrot-set-with-blended-gradients



btw : I was "fighting " with smooth escape time

I know :
Code: [Select]

float sn = n - log2(log2(dot(z,z))) + 4.0;  // equivalent optimized smooth iteration count from Inigo Quilez
double t = log(log(sqrt(test1)) / log(GetBailoutRadius())) / log((double) power);  // from KF


but for I used:

Code: [Select]
double sn = ER/cabs(z);
where ER = EscapeRadius = BailoutRadius




Offline iRyanBell

  • Strange Attractor
  • ******
  • Posts: 82
Re: How many different ways are there to show such set ?
« Reply #32 on: January 20, 2021, 10:57:28 PM »
Great shading + clean C code! Experimenting with the reflections using:

Code: [Select]
Z := complex(x, y)
C := complex(jX, jY) // 0.25 + 0i
i := 0

dC := complex(0, 0)
reflection := 0.0;
reflection2 := 0.0;
trap := cdot(Z, Z)
min := trap
min2 := 2*min
bounds := 0.0
mIter := i

v := cmplx.Exp(complex(0.0, 1.5*math.Pi));

for i = 0; i < mI; i++ {
    dC = 0.25 * dC * Z + 1.0
    Z = cmplx.Pow(Z, 2)+C

    u := Z / dC;
    u = u / complex(cmplx.Abs(u), 0)

    reflection = cdot(u, v)
    reflection = math.Pow(reflection, 2)

    trap = cdot(Z, Z)
    if trap < min {
      min2 = min
      min = trap
      mIter = i
    } else if trap < min2 {
      min2 = trap
    }
    bounds = math.Pow(1.0-min/min2, 0.1)

    if (cmplx.Abs(Z) > 100.0) {
      reflection2 = cdot(u, v);
      break;
    }
}

return reflection+reflection2+bounds


Offline v

  • Fractal Phenom
  • ****
  • Posts: 56
Re: How many different ways are there to show such set ?
« Reply #33 on: January 27, 2021, 06:42:10 PM »
potential

Nice avatar ie attached

It looks like domain coloring but different.  How did you generate that?

Offline Adam Majewski

  • Fractal Frogurt
  • ******
  • Posts: 450
Re: How many different ways are there to show such set ?
« Reply #34 on: January 27, 2021, 09:55:05 PM »
Thx. I also like it
It was bad procedure for drawing Arg(Phi(c)) = External angle of Mandelbrot set, but looks cool
Code: [Select]
# This text file describes bitmap :C:\Documents and Settings\adam\Pulpit\b1_error.bmp
#
#
# This bitmap shows Mandelbrot Set for  function F(z)=z*z+c   
#
#
# Bitmap details:
#------------------------------------------------------------
MainAlgorithmType:=maPhi
#-----------------------------------------------------------
#  The image contains a rectangular region :   
#---------- corners of c-plane ---------------
C_Plane.eCxMin:=   -2,5
C_Plane.eCxMax:=   1,5
C_Plane.eCyMin:=   -2
C_Plane.eCyMax:=   2
#--------- center and sides of c-plane -----------
C_Plane.Center.x:= -0,5
C_Plane.Center.y:= 0
C_Plane.width:=    4
C_Plane.height:=   4
#---------------------------------
#    Bitmap size in pixels:
Bitmap Width=      400
Bitmap Height=     400
Number of bitmap points  = 160000 points
Drawing Time := 235 miliseconds 
#
#        Bitmapa.PixelFormat = pf32bit
#------------------------------------
#    If Distorsion = 1 then image is not deformed
integer Width / Height Ratio =1
extended Width / Height Ratio =1
eWHR/iWHR = Distorsion=1
#----------------------------------------------------
# Maximal number of iterations
IterationMax :integer:=  1000
Escape Radius :single:=  100
#-------------------------
#
#   Informations about program:
    program name: MandelbrotSetExplorer
#    It is made using:
#        programing language: object Pascal
#        compiler : VER 140-
#        IDE: Borland Delphi 6.0 - 7.0 personal edition - 10.0 Turbo Explorer
#    programing style : obiektowy
#    method : wizualna (RAD)
#    libaries : standard =  VCL
#    OS: windows 98 SE
#    hardware: PC: AMD Duron 600
#
# author:  Adam Majewski
#        adammaj1@o2.pl
#       republika.pl/fraktal
#        wałbrzych 27.06.20003- 2007












--------------------------------------
and here is delphi unit :
------------------------------------------------------------
unit BoettcherU;

interface

uses  ComplexU,
      Math, // RadToDeg
      graphics, // clBlack
      windows; // GetBValue


  Procedure GivePhi_M(c:TComplexNumber; iMax:integer; var b:TComplexNumber);  //----- color
  Procedure GiveBoettcherTerm_M(c,Zn:TComplexNumber; i:integer; var term:TComplexNumber);  //----- color
  Procedure DrawPhi_M;

//*********************************************************
implementation //******************************************
//*********************************************************



uses  BitmapU, MappingU, AlgorithmU, ColorU;


//--------------------------------
Procedure GiveBoettcherTerm_M
          (c,Zn:TComplexNumber; i:integer;var term:TComplexNumber);
  var iExponent:integer;
      temp,temp1:TComplexNumber;
      n:integer;
      eTemp:extended;
begin
  //  compute 2^i
  //iExponent:=2;
  //for n:=2 to i do iExponent:=2*iExponent;
  //
  CmplxSqr(Zn.x,Zn.y,temp.x,temp.y);
  CmplxDiv(c.x,c.y,temp.x,temp.y,temp1.x,temp1.y);
  //
  temp1.x:=1-temp1.x;
  temp1.y:=-temp1.y;
  //
  for n:=1 to i do
    begin
      CmplxSqr(temp1.x,temp1.y,temp.x,temp.y);
      temp1:=temp;
      if (temp.x>1000000000) or (temp.y>1000000000) then exit;
    end;
  //
  eTemp:=sqrt(sqrt(sqr(temp1.x)+sqr(temp1.y)));
  //
  term.x:= temp1.x *eTemp;
  term.y:=- temp1.y * eTemp;


end;
//-----------------------------------------------------------------------------
 Procedure GivePhi_M(c:TComplexNumber; iMax:integer; var b:TComplexNumber); // Bottcher function
 // phi(c) = Zn ^ (0.5 ^ n)
 // Z(n) = Fc( Z(n-1) )
 // Fc(z) = z*z + c

 var  temp,
      exponent:extended;
      i:integer;
      Zn,
      term:TComplexNumber;

 begin
   b:=c;
   Zn.x:=0;
   Zn.y:=0;
   for i:= 1 to iMax do
    begin
      temp:=sqr(Zn.x) - sqr(Zn.y)  + c.x;
      Zn.y:=2 * Zn.x *  Zn.y + c.y;
      Zn.x:=temp;
      //
      GiveBoettcherTerm_M(c,Zn,i,term);
      //

     
      CmplxMultiplication(b.x,b.y,term.x,term.y,b.x,b.y);
    end; //  for i:=

 end;

//------------------------
Procedure DrawPhi_M;


var iteration:integer;
     iY,iX:integer;
     eZx,eZy:extended; // eZ:=eZx + eZy*i
     eCy ,eCx:extended; // C:=eCx + eCy*i
     temp:extended;
     //Phi
     ePhiX,ePhiY:extended;
     c,b:TComplexNumber;
     //argument_Phi:extended;  //
     k:integer;
     //
     color:TColor;
     //
  begin
    For iY :=iYmin to iYMax do
      begin
        eCy:=Convert_iY_to_eY(iY);
        for iX:=iXmin to iXmax do
          begin
            eCx:=Convert_iX_to_eX(iX);
            //

            // Z0 = initial point
            eZx:=0;
            eZy:=0;
            For iteration:=0 to iterationMax-1 do
              begin
                // Z(n+1):= Sqr(Zn) + C
                temp:=Sqr(eZx)-Sqr(eZy) +eCx;
                eZy:=2*eZx*eZy+eCy;
                eZx:=temp;
                if (Sqr(eZx)+Sqr(eZy))> bailout2   then break;
              end;
              //

            // drawing procedure
            if iteration=IterationMax
              then
                // M-set
                with Bitmap1.FirstLine[iY*Bitmap1.LineLength+iX] do
                      begin
                        B := 0;
                        G := 0;
                        R := 0;
                        //A := 0;
                      end
              else // exterior of M-set
                begin
                   c.x:=eCx;
                   c.y:=eCy;
                  GivePhi_M(c,iteration,b);
                  k:= round(RadToDeg(CmplxArgumentInRad(b.x,b.y)));
                  color:=Rainbow(0,360,k );

                  with Bitmap1.FirstLine[iY*Bitmap1.LineLength+iX] do
                              begin
                                B := GetBValue(color); //
                                G := GetGValue(color);
                                R := GetRValue(color); //
                                //A := 0;
                              end ;
                 end ; //else
              //--------------
             //
           // end of drawing procedure ----------
      end; // for iX
    end; //For iY

end;
//---------------------------

end.




see also
Code: [Select]
# This text file describes bitmap :C:\Documents and Settings\adam\Desktop\mandel_ArgPhi_error2.bmp
#
#
# This bitmap shows Mandelbrot Set for  function F(z)=z*z+c   
#
#
# Bitmap details:
#------------------------------------------------------------
MainAlgorithmType:=maPhi
#-----------------------------------------------------------
#  The image contains a rectangular region :   
#---------- corners of c-plane ---------------
C_Plane.eCxMin:=   -2,5
C_Plane.eCxMax:=   1,5
C_Plane.eCyMin:=   -2
C_Plane.eCyMax:=   2
#--------- center and sides of c-plane -----------
C_Plane.Center.x:= -0,5
C_Plane.Center.y:= 0
C_Plane.width:=    4
C_Plane.height:=   4
#---------------------------------
#    Bitmap size in pixels:
Bitmap Width=      800
Bitmap Height=     800
Number of bitmap points  = 640000 points
Drawing Time := 1422 miliseconds 
#
#        Bitmapa.PixelFormat = pf32bit
#------------------------------------
#    If Distorsion = 1 then image is not deformed
integer Width / Height Ratio =1
extended Width / Height Ratio =1
eWHR/iWHR = Distorsion=1
#----------------------------------------------------
# Maximal number of iterations
IterationMax :integer:=  1000
Escape Radius :single:=  100
#-------------------------
#
#   Informations about program:
    program name: MandelbrotSetExplorer
#    It is made using:
#        programing language: object Pascal
#        compiler : VER 140-
#        IDE: Borland Delphi 6.0 - 7.0 personal edition - 10.0 Turbo Explorer
#    programing style : obiektowy
#    method : wizualna (RAD)
#    libaries : standard =  VCL
#    OS: windows 98 SE
#    hardware: PC: AMD Duron 600
#
# author:  Adam Majewski
#        adammaj1@o2.pl
#       republika.pl/fraktal
#        wa³brzych 27.06.20003- 2007

//--------------------- code -------------





procedure GreenSum2 (C,Z:TComplexNumber; var B:TComplexNumber);
  // = 1 + (c/z2)
  var Z2,temp :TComplexNumber;

  begin
  // z2 = z*z
   ComplexSqr(Z,Z2);
   // temp = c /z2
   ComplexDiv(C,Z2,Temp);
   // out = 1+ temp
   B.x:=1 +Temp.x;
   B.y:=Temp.y;


  end;
//------------------------
Procedure DrawPhi2_M;


var iteration:integer;
     iY,iX:integer;
     eZx,eZy:extended; // eZ:=eZx + eZy*i
     eCy ,eCx:extended; // C:=eCx + eCy*i
     temp:extended;
     //Phi
     ePhiX,ePhiY:extended;
     c,Z,G,B,Btemp:TComplexNumber;
     //argument_Phi:extended;  //
     p:integer;
     k:integer;
     //
     color:TColor;
     //
  begin
    For iY :=iYmin to iYMax do
      begin
        C.y:=Convert_iY_to_eY(iY);
        for iX:=iXmin to iXmax do
          begin
            C.x:=Convert_iX_to_eX(iX);
            // Z0 = initial point
            Z.x:=0;
            Z.y:=0;
            //
            B.x:=C.x;
            B.y:=C.y;
            //
            For iteration:=0 to iterationMax-1 do
              begin
                // Z(n+1):= Sqr(Zn) + C
                temp:=Sqr(Z.x)-Sqr(Z.y) +C.x;
                Z.y:=2*Z.x*Z.y+C.y;
                Z.x:=temp;
                //G:= 1+(c/sqr(z))
                GreenSum2 (C,Z,G);
                // p:= 2^(iteration+1)
                p:= PowerOf2(iteration+1);
                //Btemp:=G^ p
                ComplexPower(G,p,Btemp);
                //if hypotenuse(btemp)>1000 then  exit;
                //B:=B*Btemp
                ComplexMultiplication(B,Btemp,B);
                //if hypotenuse(b)>1000 then  exit;

                if (Sqr(Z.x)+Sqr(Z.y))> bailout2   then break;
              end;
              //

            // drawing procedure
            if iteration=IterationMax
              then
                // M-set
                with Bitmap1.FirstLine[iY*Bitmap1.LineLength+iX] do
                      begin
                        B := 0;
                        G := 0;
                        R := 0;
                        //A := 0;
                      end
              else // exterior of M-set
                begin
                  k:= round(RadToDeg(CmplxArgumentInRad(b.x,b.y)));
                  color:=Rainbow(0,360,k );

                  with Bitmap1.FirstLine[iY*Bitmap1.LineLength+iX] do
                              begin
                                B := GetBValue(color); //
                                G := GetGValue(color);
                                R := GetRValue(color); //
                                //A := 0;
                              end ;
                 end ; //else
              //--------------
             //
           // end of drawing procedure ----------
      end; // for iX
    end; //For iY

end;
//---------------------------

but I have sees similar results:

https://mathr.co.uk/mandelbrot/2013-08-20_mandelbrot_exterior_hyperbolic_tiling.png


xx
HLF ? Math ⇔ Art exhibition - altenerate ways to display Gosper Curve

Started by kram1032 on Share a fractal

1 Replies
1151 Views
Last post September 30, 2018, 05:55:38 PM
by Kalter Rauch
xx
A TV show for young fractal nerds

Started by greentexas on Fractal Humor

0 Replies
417 Views
Last post June 28, 2018, 05:53:17 PM
by greentexas
xx
IOTMC December 'show us your art' the winners are?

Started by Caleidoscope on Fractal Image of the Month

17 Replies
1013 Views
Last post January 03, 2021, 04:30:57 PM
by claude
xx
tutorial 04 by default no images show up

Started by charPixel on Fragmentarium

5 Replies
524 Views
Last post December 24, 2017, 03:06:36 AM
by 3DickUlus
xx
IOTMC November 'show us your art' And the winners are...?

Started by Caleidoscope on Fractal Image of the Month

12 Replies
616 Views
Last post December 04, 2020, 11:20:33 PM
by FractalAlex