Welcome to Fractal Forums

Fractal Software => Programming => Topic started by: David Makin on November 25, 2008, 02:55:36 AM




Title: Convergent Distance Estimation
Post by: David Makin on November 25, 2008, 02:55:36 AM
Hi all, for anyone interested I've found a way to get decent Distance Estimation for the standard Newtons (for the roots of z^p-r).
You just use the normal running derivative as for divergent fractals but obviously calculating the running derivative of the Newton concerned, store the old value of the running derivative (and z) on each iteration and the final calculation is:

      float d = 0.5*cabs((@power - 1.0)*(z-zold))
      d = -d*log(d)*cabs(dz-dzold)

where dz is the running derivative and dzold is it's old value.
@power is the power in the equation being solved (z^p-r).
It only works perfectly for integer powers >=3.


Title: Re: Convergent Distance Estimation
Post by: fractalwizz on November 25, 2008, 03:35:28 AM
Interesting!
Are you the first to discover that?
If so, congratulations.
My DE has these special properties that make it different from any other DE ever made.
I wonder if I can do the same for the newton DE.  :hrmm:


Title: Re: Convergent Distance Estimation
Post by: David Makin on November 25, 2008, 01:05:06 PM
I discovered it by trial and error rather than by mathematical investigation.
Using z-zold and dz-dzold was an educated guess.
The 0.5 and (@power-1) I worked out after examining the results at different powers.
As far as I know it is a first, at least I can't find any other distance estimation algorithms for the Newton (or any other convergent fractal).


Title: Re: Convergent Distance Estimation
Post by: lycium on November 27, 2008, 10:10:30 AM
there's a distinct lack of images in this thread about such an interesting topic!

here's a nice example from david's scraps on da: http://makinmagic.deviantart.com/art/Fixed-Newton-DE-104288692

great work (again!) dave :)


Title: Re: Convergent Distance Estimation
Post by: David Makin on November 27, 2008, 12:58:04 PM
Thanks Thomas - guess I should have included some images :)


Title: Re: Convergent Distance Estimation
Post by: fractalwizz on November 27, 2008, 05:21:37 PM
I have an image that is ready to be posted on dA today.
It looks extremely similar to yours, David.
It took about an hour on my computer at the res. I put it at.


Title: Re: Convergent Distance Estimation
Post by: David Makin on November 27, 2008, 11:17:14 PM
An hour seems a little long, what res. did you render at ?
"MMF Fixed Newton DE" rendered in under 9 minutes at 3840*2880 so even at 7680*5760 would only take about 40 minutes in Ultrafractal (I rendered it on my 3GHz P4 i.e. not a dual core).


Title: Re: Convergent Distance Estimation
Post by: fractalwizz on November 28, 2008, 02:00:13 AM
It was I think an exponent 10 newton.
Oh. It completed in 36 minutes, 23 seconds, and 235 nanoseconds.
It was being rendered at 4000 by 3000.


Title: Re: Convergent Distance Estimation
Post by: David Makin on November 28, 2008, 02:21:48 AM
It was I think an exponent 10 newton.
Oh. It completed in 36 minutes, 23 seconds, and 235 nanoseconds.
It was being rendered at 4000 by 3000.

Hmm maybe you were more zoomed-in than I was then :)
Mine's a degree 10 too, max. iterations was 1000, UF magnification 36.520814.

Just one thing though, my formula uses:

dz = dz *((@power - 1.0)/@power - @root*(@power - 1.0)*pz^(@power - 2.0)/(@power*pz^(2.0*(@power - 1.0))))

In Ultra Fractal the (@power-1.0)/@power, @root*(@power-1.0), (@power-2.0) and 2.0*(@power-1.0) are all calculated at compile time.



Title: Re: Convergent Distance Estimation
Post by: gamma on November 28, 2008, 10:27:01 PM
I barely understand what you're talking about, but logarithm reminded me of a theorem from here:
http://www.math.sunysb.edu/~scott/Newton.ps.gz