Title: (C++) How to deep zoom in mandelbrot set? Post by: David041697 on March 16, 2017, 07:46:36 PM Hi,
I'm an undergraduate physics student and I know the basics of programming. I recently became very interested in fractals, after studying the math behind them, I decided to start with the Mandelbrot Set. I made a pretty simple program in C++ and I'm using doubles. I zoomed in to E-13 and after that I started to loose precision to the point I wasn't able to continue without some inconveniences. So, my question is, how can I go deeper? I tried long doubles but even for a relatively small number of iterations (1000), it takes too much time to make a single image. I'm aware that there are some programs that help with making fractals but I'm more interested in making the program. Any help is very appreciated. Thanks, Juan David Title: Re: (C++) How to deep zoom in mandelbrot set? Post by: lycium on March 16, 2017, 08:45:45 PM Hi, welcome to the forums.
You need to use an arbitrary precision arithmetic library, and these will be very slow compared to native doubles. You can get a lot of speed back on modern CPUs by using multi-threading (can be as easy as adding "#pragma omp parallel for" at the top of your toplevel for-loop, i.e using OpenMP), since each pixel is independent. There are some recent potential advances using perturbation methods to try to reduce the amount of precision needed for most of the deep zoom computation, but: 1. Currently there is no way to do this robustly, i.e. without "glitches" that need to be manually checked for and corrected using special cases etc 2. It's a bit fidgety to implement, and you still need an arbitrary precision arithmetic "base computation" 3. Makes multithreading a lot more complex Perhaps you can lend your physics background to addressing issue #1, as far as I know it's still an unsolved problem (the author of UltraFractal claimed to have a robust solution in 2014, but so far still unreleased). Here's the page about it (from Norfolk island!): http://www.superfractalthing.co.nf/ Bonus question, and I hope you won't mind my asking: what interests you in deep zooms? Personally I don't see any true novelty in deeper zooms, just like how we've all seen the digits 1-9 in pi. Title: Re: (C++) How to deep zoom in mandelbrot set? Post by: David041697 on March 16, 2017, 11:45:16 PM Hello,
Thank you for responding, my interest in doing a deep zoom is something I wanted to do from the start. When I became interested in fractals I found the idea of being able to zoom in to any point I wanted and see what would happen as something attractive. I don't want to do a deep zoom in the scale of 10^2000 , for example, but I would like to see some interesting stuff at a smaller scale (10^100 maybe). Title: Re: (C++) How to deep zoom in mandelbrot set? Post by: Kalles Fraktaler on March 18, 2017, 10:03:14 PM Hello David041697
Me an lycium have somewhat different opinions of the robustness of perturbation, so I'll give you my opinion for balance :) My view is that it is indeed possible to do this robustly, the problems we are having is that we want to push it as far as it can go. The thing we call perturbation consist of 2 things:
Title: Re: (C++) How to deep zoom in mandelbrot set? Post by: quaz0r on March 19, 2017, 04:33:55 AM Quote from: kalles Me an lycium have somewhat different opinions O0 |