Fractals/Iterations in the complex plane/Koenigs coordinate
Tools
General
Sister projects
In other projects

Koenigs[1] coordinate[2] are used in the basin of attraction of finite attracting (not superattracting) point (cycle),[3][4]
It is approximated by normalized iterates :
It can be defined by the formula :
Function f is locally conjugate to the model linear map[5]
Dynamics for quadratic 1D polynomials fc(z)=z²+c
// Created by inigo quilez - iq/2013// License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.////-----------------https://www.shadertoy.com/view/MdX3zN-------------------------------------------//// Dynamics for quadratic 1D polynomials fc(z)=z²+c//// * Orange: the Fatou set Kc.// * Black: the Julia set Jc.// * Checkerboard distortion: the Boettcher map phi(z).// * Checkerboard shadowing: the gradient of the Green's function, log|phi(z)|// * Blue: the two fixed points.// * Green, the period 2 fixed points.// * White: c// * Yellow: the Koening coordinates//// Some theory://// * c (white) belongs to Kc (orange), for these are all connected Julia sets.//// * When both fixed points (blue) are in Jc but not in Kc, or in other words, when both points// are repeling (derivative of fc(z) is bigger than one), c does not belong to the Mandelbrot// set's main cardioid, but to bulbs of higher period. In that case Kc (orange) is made of several// branches (as many as the period of the bul)//// * When one of the two fixed points (blue dots) is inside Kc, meanins it is attractive (derivative// of fc(z) < 1), then c belongs to the main cardiod of the Mandelbrot set, and Kc is a single piece// shape.//// * When the period 2 fixed points are always repelling (belong to Jc, not to Kc) except for the sets// that have c belonging to the period-2 bulb of the Mandelbrot set. In those cases, the green dots// become attractive and sit inside the orange area Kc.//// * The Koening coordinates can only been seen when c belongs to the main cariod{{typo help inline|reason=similar to cardiod|date=July 2023}} of the Madelbrot set////------------------------------------------------------------// complex number operationsvec2cadd(vec2a,floats){returnvec2(a.x+s,a.y);}vec2cmul(vec2a,vec2b){returnvec2(a.x*b.x-a.y*b.y,a.x*b.y+a.y*b.x);}vec2cdiv(vec2a,vec2b){floatd=dot(b,b);returnvec2(dot(a,b),a.y*b.x-a.x*b.y)/d;}vec2csqrt(vec2z){floatm=length(z);returnsqrt(0.5*vec2(m+z.x,m-z.x))*vec2(1.0,sign(z.y));}vec2conj(vec2z){returnvec2(z.x,-z.y);}vec2cpow(vec2z,floatn){floatr=length(z);floata=atan(z.y,z.x);returnpow(r,n)*vec2(cos(a*n),sin(a*n));}//------------------------------------------------------------floatargument(invec2p){floatf=atan(p.y,p.x);if(f<0.0)f+=6.2831;f=f/6.2831;returnf;}floatgrid(invec2p){vec2q=16.0*p;vec2r=fract(q);floatfx=smoothstep(0.05,0.06,r.x)-smoothstep(0.94,0.95,r.x);floatfy=smoothstep(0.05,0.06,r.y)-smoothstep(0.94,0.95,r.y);return0.5+0.5*mod(floor(q.x)+floor(q.y),2.0);}floatcross(vec2a,vec2b){returna.x*b.y-a.y*b.x;}boolisInTriangle(invec2p,invec2a,invec2b,invec2c){vec3di=vec3(cross(b-a,p-a),cross(c-b,p-b),cross(a-c,p-c));returnall(greaterThan(di,vec3(0.0)));}floatdistanceToSegment(vec2a,vec2b,vec2p){vec2pa=p-a;vec2ba=b-a;floath=clamp(dot(pa,ba)/dot(ba,ba),0.0,1.0);returnlength(pa-ba*h);}vec3circle(vec3bcol,vec3col,invec2a,invec2b){floatrr=0.04;vec3res=mix(bcol,col,1.0-smoothstep(rr-0.01,rr,length(a-b)));floatf=smoothstep(rr-0.01,rr,length(a-b))-smoothstep(rr,rr+0.01,length(a-b));returnmix(res,vec3(0.0),f);}//------------------------------------------------------------voidmainImage(outvec4fragColor,invec2fragCoord){vec2uv=fragCoord.xy/iResolution.xy;vec2p=-1.0+2.0*uv;p.x*=iResolution.x/iResolution.y;floatat=mod((iGlobalTime+.5)/5.0,8.0);vec2c=vec2(-0.800,0.100);c=mix(c,vec2(0.280,-0.490),smoothstep(0.0,0.1,at));c=mix(c,vec2(-0.500,-0.500),smoothstep(1.0,1.1,at));c=mix(c,vec2(-0.160,0.657),smoothstep(2.0,2.1,at));c=mix(c,vec2(-0.650,0.100),smoothstep(3.0,3.1,at));c=mix(c,vec2(-0.114,0.650),smoothstep(4.0,4.1,at));c=mix(c,vec2(-0.731,0.166),smoothstep(5.0,5.1,at));c=mix(c,vec2(-0.100,-0.660),smoothstep(6.0,6.1,at));c=mix(c,vec2(-0.800,0.100),smoothstep(7.0,7.1,at));// get the 2 fixed pointsvec2one=vec2(1.0,0.0);vec2fix1_1=0.5*(one+csqrt(one-4.0*c));vec2fix1_2=0.5*(one-csqrt(one-4.0*c));vec2fix2_1=-(csqrt(-4.0*c-3.0*one)+one)/2.0;vec2fix2_2=(csqrt(-4.0*c-3.0*one)-one)/2.0;vec2fix2_3=-(csqrt(one-4.0*c)-one)/2.0;vec2fix2_4=(csqrt(one-4.0*c)+one)/2.0;vec2z=p;vec2dz=vec2(1.0,0.0);vec2ph=z;vec2gr=vec2(log(length(z)),atan(z.y,z.x));floatt=0.0;for(inti=0;i<512;i++){if(dot(z,z)>10000.0)continue;t+=1.0;// derivativedz=2.0*cmul(z,dz);// pointz=cmul(z,z)+c;vec2a=cdiv(z,z-c);floats=pow(0.5,t);// phiph=cmul(ph,cpow(a,s));// greengr.x+=log(length(a))*s;floataa=atan(a.y,a.x);if(isInTriangle(z,vec2(0.0),fix1_2,c)){aa-=sign(aa)*2.0*3.14159;}gr.y+=aa*s;}vec3col=vec3(1.0,0.65,0.10);if(t<511.0){floats=pow(0.5,t);vec2phib=cpow(z,s);floatphiR=length(phib);floatgreenR=log(length(z))*s;floatgreenI=argument(z*s);floatd=log(length(z))*length(z)/length(dz);vec2gradG=-conj(cmul(dz,conj(z)));floatn=t/50.0;floatsn=-log2(abs(greenR))/50.0;col=vec3(0.6+0.4*dot(normalize(-gradG),vec2(0.707)));col*=vec3(grid(ph));col*=vec3(1.0)*clamp(d*50.0,0.0,1.0);}else{z=p;floatt=0.0;for(inti=0;i<200;i++){if(length(z-fix1_2)>0.001){z=cmul(z,z)+c;t+=1.0;}}vec2fix=fix1_2;if(length(2.0*fix1_1)<1.0)fix=fix1_1;if(length(2.0*fix)<1.0){vec2ph=cdiv(z-fix,cpow(2.0*fix,t));floatg=log(length(ph));floatl=1.0-0.1*smoothstep(0.7,0.71,sin(48.0*g));col+=0.1*(abs(g));ph=1.0*vec2(length(ph),atan(ph.y,ph.x)/3.14);col*=l;}}// color depending of attractive/repulsive fixed pointcol=circle(col,vec3(1.0,1.0,1.0),p,c);vec3col2=vec3(0.0,1.0,0.0);col=circle(col,col2,p,fix2_1);col=circle(col,col2,p,fix2_2);col=circle(col,col2,p,fix2_3);col=circle(col,col2,p,fix2_4);vec3col1=vec3(0.0,0.7,1.0);col=circle(col,col1,p,fix1_1);col=circle(col,col1,p,fix1_2);fragColor=vec4(col,1.0);}