When I make a normal Mandelbrot set, it works fine. But when I try to invert it into a teardrop-like thing (see here for more context: https://www.youtube.com/watch?v=mLJJUElQMRY) it is completely distorted and looks nothing like a teardrop.
I've tried looking into it but it seems like I'm doing everything correct. I'm inverting it by dividing 1 by the 'c' variable.
Here is a section of my code which is the actual formula, this is written in processing which is just Java with added visual libraries:
zx2=zx*zx;
zy2=zy*zy;
zy = 2*zx*zy + 1.0/(y); //the "1.0/" is what makes it inverted, a normal Mandelbrot set is just y and x on its own.
zx = zx2-zy2 + 1.0/(x);
It's extremely distorted when I run the code and doesn't even look like a teardrop! Here is what it looks like:
Then I tried fixing it by implementing the code of an answer, here's the code:
zx2=zx*zx;
zy2=zy*zy;
zy = 2*zx*zy + (y/(x*x+y*y));
zx = zx2-zy2 + (x/(x*s+y*y));
But although it does look inverted, it's still distorted and doesn't look like a teardrop. Here's a photo:
.
Have I done something wrong while implementing the code?