Re: Douady-Hubbard Potential
- From: caos.snow@xxxxxxxxx
- Date: 28 Feb 2006 11:32:32 -0800
Sorry, as usual some typos:
1] "For a perfect circle-shaped wire, the potential is radial and equal
to log|z|."
but should be
"For a perfect circle-shaped wire, the potential is radial and
equal to log|c|."
2] property . G(Zn+1) = G(Z)
should be
. G(Zn+1) = 2G(Z)
The code for the potential pictures could be something like (all
variables are floats)
// c = a + ib
x = x2 = 0.0f;
y = y2 = 0.0f;
sum = 0.00f;
fac = 0.25f;
for( int i=0; i<512; i++ )
{
// z^2 + c
x += a;
y += b;
x2 = x*x;
y2 = y*y;
// z -> z^2
y = 2.0f*x*y;
x = x2-y2;
// 1+ c/z^2
d = 1.0f/(x*x + y*y);
tx = ( a*x + b*y)*d + 1.0f;
ty = (-a*y + b*x)*d;
// increment summation (note log(sqrt(x)) = .5*log(x)
sum += fac*logf( tx*tx+ty*ty );
fac *= .5f;
// test escape radious 10
m2 = x2+y2;
if( m2>100.0f )
break;
}
G = .5f*logf(a*a+b*b) + sum;
But this is ugly (an attempt to optimize). If you have a complex
number library, this would be the "clean" version
z = 0;
G = log(abs(c));
fac = 0.5;
for( i=0; i<512; i++ )
{
// iterate
z = z*z + c;
// accumulate potential
G += fac*log(abs(1+c/(z*z));
// test escape radious 10
if( abs(z)>10 )
break;
}
.
- References:
- Douady-Hubbard Potential
- From: Adam Majewski
- Re: Douady-Hubbard Potential
- From: Roger Bagula
- Re: Douady-Hubbard Potential
- From: Adam Majewski
- Re: Douady-Hubbard Potential
- From: caos . snow
- Douady-Hubbard Potential
- Prev by Date: Re: Douady-Hubbard Potential
- Next by Date: Re: Stellar/Atomic Self-Similarity
- Previous by thread: Re: Douady-Hubbard Potential
- Next by thread: Mandelbrot Study of Polysigned Numbers
- Index(es):