Welcome to Fractal Forums

Fractal Math, Chaos Theory & Research => Other types => Topic started by: 0x80 on September 30, 2013, 09:55:24 AM




Title: littlewood fractal
Post by: 0x80 on September 30, 2013, 09:55:24 AM
Hi , i am a web developer ..
I was playing with Python data visualization patterns and i have implemented
littlewood fractal .

(http://fc09.deviantart.net/fs71/f/2013/271/c/e/beauty_of_roots_by_rootdiver-d6oa1s5.png)

i am no fractal expert , in fact this is my first fractal drawing which made me interested in fractals .
so my question is , are there any other variations of this fractal that i can play with ?

ps. if you into that stuff , here is a source code : https://github.com/Alexander-0x80/Beauty-of-roots (https://github.com/Alexander-0x80/Beauty-of-roots)



Title: Re: littlewood fractal
Post by: Tglad on September 30, 2013, 10:17:36 AM
There's a discussion of the formula here: http://www.math.ucr.edu/home/baez/roots/  he calls it the Christensen set, and you can adjust the parameters n and d.
It has some similarities with this: http://blogs.ams.org/visualinsight/2013/09/01/algebraic-numbers/

and also has some visual similarities with some fractals I made here: https://sites.google.com/site/tomloweprojects/scale-symmetry/mobius-maps

It is a nice fractal isn't it


Title: Re: littlewood fractal
Post by: knighty on September 30, 2013, 10:30:24 PM
I also remember a thread here in fractalforums about that fractal. Unfortunately, I can't find it by now.
See also: LINK (http://www.alfedenzia.com/fractals/) describing an escape time definition.
I've also written a DE for it in the hope that it's 3D generalisation would give good looking fractal... That was not the case.
Code:
//Use with evaldraw (http://advsys.net/ken/download.htm)
(x,y){
   static binit=1;
   static frm=-1,mx,my,mr2;
   if(frm<numframes){
      frm=numframes;
      mx=(mousx-0.5*xres)*0.005;
      my=(0.5*yres-mousy)*0.005;
      mr2=deifs(mx,my);mr2*=mr2;
   }
   if((x-mx)^2+(y-my)^2<mr2) return 0;
   deifs(x,y)^0.25
}
static maxiter=100,maxdepth=30;
static tcx=0,tcy=1,tcr=sqrt(1);//tcr=sqrt(tcx^2+tcy^2)//is this thing invariant, the same for any tcx and tcy?
enum {Npq=256};
deifs(x,y){
   r2=x*x+y*y;inverted=0;
   if(r2<1){r2=1/r2;x*=r2;y*=r2;inverted=1;}
   if(r2<1.75) return 0.04;
   
   trx=x;
   try=y;
   s=sqrt(r2);r2=s;
   bvr=tcr/(s-1);//bvr=min(bvr,3);
   tis=1/s;
   
   //priority queue... the most stupid possible :o))
   auto pqx[Npq];//x
   auto pqy[Npq];//y
   auto pqs[Npq];//1/accumulated_scale
   auto pqd[Npq];//distance
   auto pqh[Npq];//depth
   stptr=0;//pointer in the priority queue
   
   bvrm=100;//controls the smoothness of the DE field (lower values faster, higher values smoother)
   
   {//first instances
      x0=tcx;y0=tcy;//initial value, faster than beginning at (0,0)
      pqx[stptr]=x0; pqy[stptr]=y0;
      pqs[stptr]=tis;//instead of 1 because of the initial value of (1,0)
      pqd[stptr]=tcr-bvr;
      pqh[stptr]=0;
      stptr++;
   }
   bNoExit=1;i=0;ii=0;
   while(bNoExit && i<maxiter){
      //extract nearest element
      {
         depth=pqh[stptr-1];
         if(depth>maxdepth) break;
         stptr--;
         x=pqx[stptr]; y=pqy[stptr];s=pqs[stptr];ad=pqd[stptr];
         
      }
      //generate and insert its children
      nx=x*trx-y*try;
      ny=x*try+y*trx;
      nc=-1;
      for(j=0;j<2;j++){
         //generate child j
         pqx[stptr]=nx+nc*tcx;
         pqy[stptr]=ny+nc*tcy;
         pqs[stptr]=s*tis;
         pqd[stptr]=(sqrt((pqx[stptr])^2+(pqy[stptr])^2)-bvr)*pqs[stptr];
         pqh[stptr]=depth+1;     
         nc=1;
         //insert it at its place
         ptr=stptr;
         imm=0;
         while(ptr>0){
            if(pqd[ptr]>pqd[ptr-1]){//swap
               k=pqx[ptr]; pqx[ptr]=pqx[ptr-1]; pqx[ptr-1]=k;
               k=pqy[ptr]; pqy[ptr]=pqy[ptr-1]; pqy[ptr-1]=k;
               k=pqs[ptr]; pqs[ptr]=pqs[ptr-1]; pqs[ptr-1]=k;
               k=pqd[ptr]; pqd[ptr]=pqd[ptr-1]; pqd[ptr-1]=k;
               k=pqh[ptr]; pqh[ptr]=pqh[ptr-1]; pqh[ptr-1]=k;
               ptr--;imm++;
            } else break;
         }
         stptr++;
      }
      d=pqd[stptr-1];x=pqx[stptr-1];y=pqy[stptr-1];s=pqs[stptr-1];
      bNoExit=(x*x+y*y<bvrm*bvr*bvr);
      i++;
   }
   DE=0.5*pqd[stptr-1]/bvr;
   if(inverted)
      return DE;//good for the interior!
   return r2^2/(1/DE+r2);//deduced from the interior distance
}


Title: Re: littlewood fractal
Post by: Nahee_Enterprises on October 01, 2013, 12:38:11 PM
    Hi , i am a web developer ..
    I was playing with Python data visualization patterns and i have implemented littlewood fractal .
            http://fc09.deviantart.net/fs71/f/2013/271/c/e/beauty_of_roots_by_rootdiver-d6oa1s5.png (http://fc09.deviantart.net/fs71/f/2013/271/c/e/beauty_of_roots_by_rootdiver-d6oa1s5.png)
    i am no fractal expert , in fact this is my first fractal drawing which made me interested in fractals .
    so my question is , are there any other variations of this fractal that i can play with ?
    ps.  if you into that stuff , here is a source code : https://github.com/Alexander-0x80/Beauty-of-roots (https://github.com/Alexander-0x80/Beauty-of-roots)

Greetings, and welcome to this particular forum !!!     :D

You have already gotten some good answers, and there are many ways to create visually similar fractal type images, if that is what you are trying for.
 


Title: Re: littlewood fractal
Post by: 0x80 on October 03, 2013, 02:21:01 PM
Thank you for your replies ,thats fascinating ..