• December 03, 2021, 08:24:05 AM

### Author Topic:  Another solution to perturbation glitches  (Read 1571 times)

0 Members and 1 Guest are viewing this topic.

#### Zhuoran

• Fractal Friend
• Posts: 13
##### Another solution to perturbation glitches
« on: August 03, 2021, 11:06:50 AM »
Here's the pseudocode

Code: [Select]
complex Reference[]; // Reference orbit (MUST START WITH ZERO)int MaxRefIteration; // The last valid iteration of the reference (the iteration just before it escapes)complex dz = 0, dc; // Delta z and Delta cint Iteration = 0, RefIteration = 0;while (Iteration < MaxIteration) {    dz = 2 * dz * Reference[RefIteration] + dz * dz + dc;    RefIteration++;        complex z = Reference[RefIteration] + dz;    if (|z| > BailoutRadius) break;    if (|z| < |dz| || RefIteration == MaxRefIteration) {        dz = z;        RefIteration = 0;    }    Iteration++;}
This have been used in my program for some time. While it requires no additional references, it appears to be very reliable, even when single precision is used.
I will provide a more detailed explanation when I have time.

#### claude

• 3f
• Posts: 2081
##### Re: Another solution to perturbation glitches
« Reply #1 on: August 03, 2021, 02:56:16 PM »
Very interesting.  This is similar to what my mandelbrot-perturbator uses (rebase to new reference and carry on), but using the original reference instead of computing a new reference.  This may be ok for deep zooms for images where the iteration count doesn't span too many periods of the central-minibrot-reference, as nearby reference orbits will be similar (up to a point).

#### Zhuoran

• Fractal Friend
• Posts: 13
##### Re: Another solution to perturbation glitches
« Reply #2 on: August 03, 2021, 04:17:28 PM »
This may be ok for deep zooms for images where the iteration count doesn't span too many periods of the central-minibrot-reference, as nearby reference orbits will be similar (up to a point).
This works for all locations I've ever tested, including those which don't have a central minibrot.
For example, this location can be rendered correctly using single precision float.
Re=0.2500000002
Im=0.0000000000000035
Height=4e-15
Iterations=5000000

#### unassigned

• Posts: 72
##### Re: Another solution to perturbation glitches
« Reply #3 on: August 05, 2021, 02:04:48 AM »
Interesting. Have you tried a case where the reference escapes earlier than the rest of the image, or deep(ish) locations such as dinkydau's 'flake', which are notoriously difficult with glitches?

#### quaz0r

• Fractal Feline
• Posts: 192
##### Re: Another solution to perturbation glitches
« Reply #4 on: August 06, 2021, 02:26:05 AM »
interesting.  can someone explain conceptually what is happening by setting dz to z and refiter to zero?

#### superheal

• Fractal Feline
• Posts: 167
##### Re: Another solution to perturbation glitches
« Reply #5 on: August 10, 2021, 03:40:41 PM »
Is it possible to provide a complete snippet of code for the image generation?

#### claude

• 3f
• Posts: 2081
##### Re: Another solution to perturbation glitches
« Reply #6 on: November 04, 2021, 08:11:34 PM »
interesting.  can someone explain conceptually what is happening by setting dz to z and refiter to zero?

By perturbation, Z_pixel = Z_reference + Z_delta.  Assuming no rounding errors, this is valid for any reference.

You can shift to a different reference by Z_pixel = Z_reference1 + Z_delta1 = Z_reference2 + Z_delta2 so Z_delta2 = Z_reference1 + Z_delta1 - Z_reference2.

In the special case of Z_reference2 = 0, this boils down to Z_delta2 = Z_reference1 + Z_delta1 = Z_pixel.  As reference iteration starts from 0+0i at iteration 0, you can always do this, simply by resetting the reference iteration count to 0.

You should also adjust C using C_pixel = C_reference1 + C_delta1 = C_reference2 + C_delta2, but using the same single C_reference means C_delta is unchanged so nothing more to do.

#### claude

• 3f
• Posts: 2081
##### Re: Another solution to perturbation glitches
« Reply #7 on: November 04, 2021, 08:23:56 PM »
They look a little different in one small test I did - not sure whether that is down to "ignore isolated glitches" being enabled (in which case R338 might be the worse one!)
It's impressive, 1 reference does look almost identical to 338 references, taking significantly less time....

Code: [Select]
Re: -1.768618944488918688116520619642598596399382011568110543189455247137712097108842366697267161953806912304334525917255750178531683999731Im: -0.0019495406811714611326075394128720539710604769400681941245536112918716898406198996978261749509772305676130532418902545657892942000000Zoom: 9.1292669371170181E93Iterations: 50100100

#### superheal

• Fractal Feline
• Posts: 167
##### Re: Another solution to perturbation glitches
« Reply #8 on: November 04, 2021, 08:56:00 PM »
I have been using this to Mandelbrot 2-5 powers and burning ships, lambda, nova, magnet and the newton parameter space without any issue!

#### claude

• 3f
• Posts: 2081
##### Re: Another solution to perturbation glitches
« Reply #9 on: November 04, 2021, 09:06:58 PM »
difference between images from KF (unreleased WIP) post-processed in GNU Image Manipulation Program

Dinkydau's Flake location

single reference method (1 reference) vs ignore isolated glitches disabled (97 references)
vs
ignore isolated glitches enabled (22 references) vs ignore isolated glitches disabled (97 references)

18.5s vs several minutes
vs
29.8s vs several minutes

Regarding quality, IMO 1ref (new method) is less different from 97refs (good quality options in KF) than 22refs (typically acceptable approximation for speed gain) is from 97refs, and it's also faster, so it's an overall big improvement.

The next week or so I'll try to finish implementing it for all the other code paths in KF - so far it's only the simplest (non-SIMD, no derivatives) version so far.

#### claude

• 3f
• Posts: 2081
##### Re: Another solution to perturbation glitches
« Reply #10 on: November 04, 2021, 09:14:30 PM »
I have been using this to Mandelbrot 2-5 powers and burning ships, lambda, nova, magnet and the newton parameter space without any issue!
Yes nothing about it depends on anything special about the Mandelbrot set, just 2 things are needed: basic property of perturbation, and an iteration at which the reference orbit is 0 (usually corresponds to critcal point 0, iteration number 0)

#### superheal

• Fractal Feline
• Posts: 167
##### Re: Another solution to perturbation glitches
« Reply #11 on: November 04, 2021, 09:17:55 PM »
and it also works in julia sets, see my other post!

#### pauldelbrot

• 3f
• Posts: 3274
##### Re: Another solution to perturbation glitches
« Reply #12 on: November 04, 2021, 10:31:21 PM »
This some sort of a joke? Those are two blank black rectangles, not Dinkydau's "flake" location.

#### FractalAlex

• Perturbation formula helper
• Fractal Freak
• Posts: 703
• One step closer to victory
##### Re: Another solution to perturbation glitches
« Reply #13 on: November 04, 2021, 10:33:26 PM »
difference between images from KF (unreleased WIP) post-processed in GNU Image Manipulation Program

Dinkydau's Flake location

single reference method (1 reference) vs ignore isolated glitches disabled (97 references)
vs
ignore isolated glitches enabled (22 references) vs ignore isolated glitches disabled (97 references)

18.5s vs several minutes
vs
29.8s vs several minutes

Regarding quality, IMO 1ref (new method) is less different from 97refs (good quality options in KF) than 22refs (typically acceptable approximation for speed gain) is from 97refs, and it's also faster, so it's an overall big improvement.

The next week or so I'll try to finish implementing it for all the other code paths in KF - so far it's only the simplest (non-SIMD, no derivatives) version so far.

Uh... something's not right here, the images are blank, I can see it as well.

#### claude

• 3f
• Posts: 2081
##### Re: Another solution to perturbation glitches
« Reply #14 on: November 05, 2021, 10:42:27 AM »
This some sort of a joke? Those are two blank black rectangles, not Dinkydau's "flake" location.

they are differences between images - black means pixels are identical, colours mean pixels differ.
They are not 100% black, look at full size and you can see a bit of the shape.

### Similar Topics

###### Black dots and glitches in Kalle's Fraktaler

Started by PrinceOfCreation on Noob's Corner

3 Replies
290 Views
September 08, 2020, 08:46:26 AM
by claude
###### glitches with high order series approximation used for large images

Started by claude on Kalles Fraktaler

6 Replies
903 Views
September 13, 2017, 01:51:54 PM
by knighty
###### perturbation for Z := exp(Z) + C

Started by claude on Fractal Mathematics And New Theories

6 Replies
1304 Views
May 20, 2019, 06:11:53 AM
by LionHeart
###### Perturbation formulas

Started by FractalAlex on Kalles Fraktaler

78 Replies
1777 Views
July 03, 2020, 05:59:20 PM
by FractalAlex
###### Perturbation theory

Started by gerrit on Fractal Mathematics And New Theories

213 Replies
13682 Views
August 12, 2020, 07:38:03 AM
by gerrit