• May 06, 2021, 05:10:35 PM

### Author Topic: (Question) Weird Perturbation Theory thingy  (Read 250 times)

0 Members and 1 Guest are viewing this topic.

#### Mr Rebooted

• Fractal Phenom
• Posts: 57
##### (Question)Weird Perturbation Theory thingy
« on: November 11, 2020, 08:48:08 PM »
Can anyone explain why this looks like a Mandelbrot Set with a starting value that's not 0+0i with Perturbation Theory on?

#### claude

• 3f
• Posts: 1849
##### Re: Weird Perturbation Theory thingy
« Reply #1 on: November 11, 2020, 09:26:06 PM »
Possibly an "off by one" error?  Make sure your reference iterations line up with your pixel iterations.  At iteration 1, ref Z = ref C and delta z = delta c.  Other than that, show code if you want people to debug it

#### Mr Rebooted

• Fractal Phenom
• Posts: 57
##### Re: Weird Perturbation Theory thingy
« Reply #2 on: November 11, 2020, 09:44:49 PM »
Just checked, and I think it has to do with the Precision. BTW, here's the code to my perturbation theory function:
Code: [Select]
double mandelbrotPerturbation(dvec2 c, dvec2 dc) {    dvec2 z = dvec2(Start.x, Start.y);    dvec2 dz = dvec2(Start.x, Start.y);    dvec2 glitchedC = dvec2(0.0, 0.0);    for (int i = 0; i < itr; i++) {        dvec2 dznew;        dvec2 znew;        if (FRACTAL_TYPE == 0) {            dz = c_times(2.0*z+dz,dz) + dc;            //dz = c_times(dvec2(2.0, 0.0), c_times(z, dn)) + c_powi(dn, 2) + dc;            z = c_times(z, z) + c;            if (glitchedPixel) {                dz = c_times(2.0*z+dz, dz) + glitchedC;                z = c_times(z, z) + c;            }        } else if (FRACTAL_TYPE == 1) {            dznew.x = 2.0*z.x*dz.x+(dz.x*dz.x)-(dz.y*dz.y)-2.0*dz.y*z.y + dc.x;            dznew.y = dc.y - 2.0*(z.x*dz.y+dz.x*z.y+dz.x*dz.y);            znew.x = z.x*z.x - z.y*z.y + c.x;            znew.y = c.y - (2.0*z.x*z.y);            dz = dznew;            z = znew;        } else if (FRACTAL_TYPE == 2) {            dznew.x = 2.0*z.x*dz.x+(dz.x*dz.x)-(dz.y*dz.y)-2.0*dz.y*z.y + dc.x;            dznew.y = dc.y - 2.0*abs(z.x*dz.y+dz.x*z.y+dz.x*dz.y);            znew.x = z.x*z.x - z.y*z.y + c.x;            znew.y = -2.0*abs(z.x*z.y)+c.y;            dz = dznew;            z = znew;        }        //dz = dznew;        //z = znew;        if (dot(z+dz, z+dz) > threshold) {            escaped = true;            break;        }        if (dot(z+dz, z+dz)/dot(z, z) < 1e-6) {            glitchedPixel = true;            glitchedC = z + dz;            break;        }        n++;    }    return n/float(itr);}

#### claude

• 3f
• Posts: 1849
##### Re: Weird Perturbation Theory thingy
« Reply #3 on: November 11, 2020, 10:06:46 PM »
Oh yes, at zoom e18 you need more than double precision for the reference orbit - looks like GLSL, you'll need to calculate a higher precision reference orbit (probably on CPU) and transfer it in texture or similar.

#### Mr Rebooted

• Fractal Phenom
• Posts: 57
##### Re: Weird Perturbation Theory thingy
« Reply #4 on: November 11, 2020, 10:25:17 PM »
ooh, so THAT's why it looks like a seeded mandelbrot, thanks!

### Similar Topics

###### "Time Span"

Started by cricke49 on Fractal Image Gallery

0 Replies
917 Views
August 02, 2018, 07:05:21 AM
by cricke49
###### Perturbation theory

Started by gerrit on Fractal Mathematics And New Theories

213 Replies
12809 Views
August 12, 2020, 07:38:03 AM
by gerrit
###### Perturbation Theory works! However...

Started by Mr Rebooted on Programming

4 Replies
209 Views
November 10, 2020, 04:12:18 AM
by 3DickUlus
###### The magic behind Perturbation theory

Started by FractalAlex on Kalles Fraktaler

11 Replies
360 Views
June 11, 2020, 08:39:25 PM
by claude
###### How to get second reference when using Perturbation Theory?

Started by Mr Rebooted on Programming

11 Replies
463 Views
November 10, 2020, 02:03:44 PM
by Mr Rebooted