     POV-Ray : Newsgroups : povray.binaries.images : Here's TIA Server Time: 30 Sep 2020 00:21:20 GMT  Here's TIA (Message 1 to 3 of 3)          From: Melody Subject: Here's TIA Date: 11 Jan 2020 02:50:01 Message:    ```Do you want to read a long winded thesis - or hear the lecture???
NO. you want to see 10 lines of code and grok it in 2 minutes.

There was color midpoint stuff that changed nothing for a smooth palette, but
all palette stuff aside, here is "Triangle Inequality"

Eleven significant lines ... TIA
int mandel(double px, double py) {
int ra,col, mandelbrotPower = 2; ///double bailout = pow(10,3);
double bailout_squared = bailout * bailout;
double sum=0,sum2=0,ac,il,lp,az2,lowbound,f,index;
double z = { 0.0,0.0 } ;
double c = { px,py } ;
double v = { 0,0 } ;
/// Triangle Inequality

ac = VLEN2(c);
il = 1.0 / log(mandelbrotPower);
lp = log(log(bailout) / mandelbrotPower);

int i = 0;
double x = 0.0, y = 0.0, xx = 0.0, yy = 0.0;
while ((i < MAX_iters) && (xx + yy < bailout_squared)) {

if (ABORT) break;
y = 2.0 * x * y + py;
x = xx - yy + px;
xx = x * x;
yy = y * y;

z = x;
z = y;
sum2=sum;
if ((i) && (i != MAX_iters-1)) {
SUBV2(v,z,c);
az2 = VLEN2(v);
lowbound = fabs(az2 - ac);
sum+=((VLEN2(z)-lowbound)/(az2+ac-lowbound));
}
i++;
}
if (i == MAX_iters) col = 0;
else {
///TIA log(log(length)) log(pwr) log(log(bailout/pwr))
///  figured in with last 2 sums- "Triangle"
sum = sum / (float)i;
sum2 = sum2/(float)(i-1);
f = il*lp - il*log(log(VLEN2(z)));
index = sum2 + ((sum-sum2) * (f+1.0));

/// rest is just palette stuff
ra = (int)(index * 255.0);
if (ra < 0) ra += 255;

ra = (ra + (int)(nColors * colorcycle) ) % nColors;
col = colorpalette[ra];
}
return col;
}

fractal height fields? hmmm ...
```

Attachments:    From: Melody Subject: Re: Here's TIA Date: 11 Jan 2020 10:30:01 Message:    ```Finished the color spreader stuck at 45, now 3 to 100.
between 2 to 64 colors

That control factor, like contrast, pulls out detail,
where the colorcycle will put the like/dark where you want it.
```

Attachments:    From: Melody Subject: Re: Here's TIA Date: 11 Jan 2020 11:15:01 Message:    ```I'll need a better job, to get the machine I need, heh.
bailout is a million times a million, or 10^12.
"10^20 recommended" -- but I saw results at 10^3 that were posted.
Details!
```

Attachments:        