Logo by mauxuam - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Check out the originating "3d Mandelbulb" thread here
 
*
Welcome, Guest. Please login or register. April 23, 2024, 02:15:28 PM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: 1 [2]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Help about implementing the perturbation theory  (Read 2348 times)
0 Members and 1 Guest are viewing this topic.
laser blaster
Iterator
*
Posts: 178


« Reply #15 on: August 18, 2013, 06:11:28 PM »

You still need to iterate, but single precision is sufficient then
Hmm... well I've been re-reading the pdf, and it seems to indicate that you can skip iterating for at least some of the points.

Now we can apply equations (3), (4) and (5) iteratively to calculate the coefficients for equation (2). Equation (2) can then be used to calculate the value for the nth iteration for all the points around X0. The approximation should be good as long as the (symbol)3 term has a magnitude signi ficantly smaller then the (symbol)2 term.

It seems like the coefficients for equation 2 only need to be calculated iteratively for one pixel. Then you can use equation 2 to estimate the position of all the pixels in the surrounding areas, but only when the symbol(3) term is significantly smaller than the (symbol)2 term.

Am I misunderstanding this?
Logged
Gluecker
Forums Newbie
*
Posts: 9


« Reply #16 on: August 21, 2013, 03:45:08 AM »

You can "skip" the first x iterations, where x is the minimum iteration count for the image to render (minus some tolerance maybe).
alternatively, using the Mariani/Silver algorithm (as described here) could be a efficient way to find x for subsections of the image.

broadly speaking: 2) can be used to approximate delta for any iteration (n), but (n) obviously has to be less than the number of iterations where the point is actually escaping to get the correct image, so you need to guess a good (n).
Logged
therror
Explorer
****
Posts: 42


« Reply #17 on: April 27, 2015, 12:57:33 PM »

Hello! I am trying to implement perturbation theory. I have written a code similar to example by Kalles Fraktaler 08.11.2013.
Code:
dnr=d0r=spix[l].p-Pmin;
dni=d0i=spix[l].q-Qmin;
yp=yq=n=0;
while (yp*yp+yq*yq<4&&n<nmax)
{
  dtr=2*(xref[n].p*dnr-xref[n].q*dni)+dnr*dnr-dni*dni+d0r;
  dti=2*(xref[n].p*dni+xref[n].q*dnr+dnr*dni)+d0i;
  yp=xref[n].p+dnr;
  yq=xref[n++].q+dni;
  dnr=dtr;
  dni=dti;
}
Reference point is calculated as double, other as float.
Picture is almost the same as usual set. But speed decreases about 2 times... IMHO, perturbation theory is ineffective at such magnification (4.93E-8). Isn't it? If I'm wrong, why speed decreases?


* perturbation.jpg (193.25 KB, 640x512 - viewed 74 times.)
Logged
youhn
Fractal Molossus
**
Posts: 696


Shapes only exists in our heads.


« Reply #18 on: April 27, 2015, 01:56:36 PM »

I do not fully understand, but will try to help.

Do you really mean that the calculation of the same image (same location, same resolution) is actually FASTER without perturbation ?! In that case, I think you've made a mistake somewhere. But please give some more insight into what you do, so we might be able to explain.

Question to help:
What is the location? (can you provide a KFR file?)
What is the resolution?
How much time does calculation WITHOUT perturbation take?
How much time does calculation WITH perturbation take in Kalles Fraktaler?
How much time does calculation WITH perturbation take in your software?
Logged
therror
Explorer
****
Posts: 42


« Reply #19 on: April 27, 2015, 02:46:50 PM »

All conditions is the same. Number of iterations, location, zoom, resolution. The only difference - few lines for perturbation and float instead double. (I never use bignum arithmetic)
Location: 
 range=4.9304E-8;
  xcenter=-0.743643900055;
  ycenter=0.131825890901.
Resolution 1280х1024. At 320x 256 usual calculation faster too.
w/o perturbation 221 second.
with perturbation 380 second in my program.
To compare with other software - good idea grin
Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #20 on: April 27, 2015, 03:26:52 PM »

you can find a C++ port of SFT here and some chatter about it here
this was ported directly from the java source and knighty helped (a lot, tnx btw) with a few bugs, it uses ArPrec lib for the full precision part.
the deepest I went with this code was E-2346 ish wink
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
quaz0r
Fractal Molossus
**
Posts: 652



« Reply #21 on: April 29, 2015, 12:45:55 AM »

he only said hes using perturbation, not series approximation.  also hes staying within the limits of hardware floating point.  so of course the extra overhead and unnecessary screwing around of perturbation is going to be slower than regular iteration.  and even if hes also using series approximation, lots of low-magnification locations will not benefit much from it, and the overhead of all that could still be slower than regular iteration.
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #22 on: April 29, 2015, 01:06:51 AM »

he only said hes using perturbation, not series approximation.  also hes staying within the limits of hardware floating point.  so of course the extra overhead and unnecessary screwing around of perturbation is going to be slower than regular iteration.  and even if hes also using series approximation, lots of low-magnification locations will not benefit much from it, and the overhead of all that could still be slower than regular iteration.

this is what is second as well, the pertubation kicks in at ridiculous depth wink it might appear that it improves double->float as well, use max double range and use float for the rest, the thing here is that modern cpus do not have any significant double precision calculation time differencies anymore regarding float/double !!!
Logged

---

divide and conquer - iterate and rule - chaos is No random!
therror
Explorer
****
Posts: 42


« Reply #23 on: May 14, 2015, 06:40:57 PM »

Thanks, dear friends! I understand that perturbation don't help me.. But I have implemented border tracing(with rectangular borders)! I made skipped points visible, it is not error. Speed is much more!


* cells.jpg (236.46 KB, 1280x1024 - viewed 77 times.)
Logged
Pages: 1 [2]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Bud Perturbation UltraFractal Gallery bib 0 1059 Last post June 02, 2009, 09:58:38 PM
by bib
The Mandelbrot Set. Perturbation Theory. UltraFractal SeryZone 0 5686 Last post October 14, 2014, 07:54:14 PM
by SeryZone
Anyone thought of implementing Perturbation on Android? Smartphones / Mobile Devices simon.snake 0 2739 Last post August 29, 2015, 10:38:30 PM
by simon.snake
Implementing MixPinski Sierpinski Gasket « 1 2 ... 8 9 » mclarekin 124 20372 Last post January 14, 2017, 12:24:58 PM
by hgjf2
Implementing ABoxModKaliEiffie Amazing Box, Amazing Surf and variations « 1 2 3 » mclarekin 30 10737 Last post November 27, 2016, 11:52:55 AM
by Sabine

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.175 seconds with 24 queries. (Pretty URLs adds 0.009s, 2q)