Logo by slon_ru - 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: Did you know ? you can use LaTex inside Postings on fractalforums.com!
 
*
Welcome, Guest. Please login or register. April 25, 2024, 05:11:48 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]   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: New method for rendering Julia sets of rational exponents (no branch cuts)  (Read 1660 times)
0 Members and 1 Guest are viewing this topic.
laser blaster
Iterator
*
Posts: 178


« on: January 05, 2017, 07:21:00 PM »

Ultra high-res version of image:
https://s24.postimg.org/d9ef1i1ar/Julia_Rat_3_5_4.jpg

I 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/llKSRw
And here's the same method applied to power 2 sets: https://www.shadertoy.com/view/MtKXRw

The 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.


* Julia_Rat_3_5-4.jpg (98.64 KB, 675x675 - viewed 190 times.)
* BufShaderRJ.frag (2.06 KB - downloaded 91 times.)
* ReverseJuliaRat.frag (4.25 KB - downloaded 79 times.)
« Last Edit: January 05, 2017, 11:38:49 PM by laser blaster » Logged
claude
Fractal Bachius
*
Posts: 563



WWW
« Reply #1 on: January 05, 2017, 09:06:27 PM »

Could that account for the difference? Or do our methods somehow produce inherently different shapes?

afaict you are plotting Julia sets and the blog post is calculating Mandelbrot sets
Logged
laser blaster
Iterator
*
Posts: 178


« Reply #2 on: January 05, 2017, 11:42:01 PM »

Ah, that makes sense. For integer powers, the degree of rotational symmetry is smaller for mandelbrot sets than their corresponding Julia sets, so it makes sense the same would apply to rational powers.
Logged
SamTiba
Safarist
******
Posts: 83


« Reply #3 on: January 15, 2017, 12:21:33 AM »

can you explain that part with and combine the results somehow a bit more?
are you combining the results after every step?
could you maybe briefly outdraw when you calculate and combine? i am not getting it out of your code (new to that language)

i am dealing with logarithms and they have a similar problem (just with infinite solutions) and i would like to have a look to search for a possible way to create sets that are somehow 'more correct'
Logged

Some of my images: Pinterest
Tglad
Fractal Molossus
**
Posts: 703


WWW
« Reply #4 on: January 15, 2017, 09:35:05 AM »

Awesome, it looks great. I would be interested to know whether the shape tends towards a fuzz as the fractional exponent becomes less simple (bigger on numerator and denominator), or whether some structure remains... the extreme case is approximating a golden ratio exponent.
Can we see more images ? 🙂
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  


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.196 seconds with 24 queries. (Pretty URLs adds 0.015s, 2q)