Ultra high-res version of image:
https://s24.postimg.org/d9ef1i1ar/Julia_Rat_3_5_4.jpgI came up with a new method for progressively rendering rational-exponent Julia sets, taking into consideration all branches of the function. Someone did something similar before:
http://www.righto.com/2011/12/new-multi-branch-algorithm-to-render.html . My method is different though. It's GPU-based and very fast, but has inherent limitations. What I'm doing is initializing a buffer with a black circle in the middle, then on each new frame I take each pixel's coordinate, transform it with zn + c, and sample the previous frame's buffer at that point (the sample becomes the new pixel value). This is conceptually the same thing as iterating the inverse mapping on the unit circle. To generalize the method to arbitrary rational powers, you just calculate each solution for z^n + c, sample the buffer at each of those points and combine the results somehow (there are multiple ways of going about this).
This method is no good for zooming (you have to render the whole thing at high resolution and crop it), and it's no good for slow-converging Julia sets because the image gets blurred after repeated transforms (sampling with sharpening reduces this effect). But for a quick and dirty way to visualize multi-branch formulas, it's not bad. Interestingly, my results are different from the results in the blog post linked above. His result shows 3-fold symmetry for the Julia set of power 5/2, whereas I get five-fold symmetry. I checked his code and my own, and I couldn't find any math mistakes. One difference is that I first raise z to power 5 (by squaring twice to get z^4 then multiplying with initial z), then take both square roots of that, whereas he takes the square root of z, then multiplies that with z squared. Could that account for the difference? Or do our methods somehow produce inherently different shapes?
The colors you see on the interior of the set are actually part of it's structure - you can think of the render result as an approximation of the probability, for each point, that the point will escape if it chooses a random branch of the function at each iteration of the traditional forward iteration method. In the attached image, the points with warmer colors are the ones that are less likely to escape.
Here's a shadertoy for a power 5/2 set:
https://www.shadertoy.com/view/llKSRwAnd here's the same method applied to power 2 sets:
https://www.shadertoy.com/view/MtKXRwThe shadertoy version is rather ugly because of the limited resolution. If you want to produce high quality renders, I've attached the fragmentarium version of the code (it doesn't work with tiled rendering - just enable custom buffer size, set it as large as you can, then do a render from the menu with only 1 tile). A description of how to tune the parameters and more details on how the method works can be found in the fragmentarium code or the shadertoy code. Oh, you also need to use the custom buffershader with the .frag file.