Logo by mclarekin - 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: Check out the originating "3d Mandelbulb" thread here
 
*
Welcome, Guest. Please login or register. November 30, 2025, 07:59:23 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: (C++) How to deep zoom in mandelbrot set?  (Read 585 times)
0 Members and 1 Guest are viewing this topic.
David041697
Forums Newbie
*
Posts: 2


« 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 
Logged
lycium
Fractal Supremo
*****
Posts: 1158



WWW
« Reply #1 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.
Logged

David041697
Forums Newbie
*
Posts: 2


« Reply #2 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).
Logged
Kalles Fraktaler
Fractal Senior
******
Posts: 1458



kallesfraktaler
WWW
« Reply #3 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 smiley
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:
  • Calculate one pixel with high precision and use it as a reference for all other pixels. This method will fail though, however thanks to Pauldelbrot we have a trustable method of detecting the pixels where the reference fails to compute the pixel with hardware precision. These pixels can be rendered with a reference closer to these pixels, so a typical perturbation render use several references.
    This method gives a speedup at about 10 times on depths of 10^100
  • Use a truncated Taylor series to approximate a starting value for a specific iteration, which make you able to skip all previous iterations.
    This method gives a speedup of typically Another 10 times on depths of 10^100, and together the speed up is typically 100 times.
    This, which we call Series Approximation, is where we have issues since we do not have any solid theoretically way of finding when too many iterations are skipped - for all pixels in the view. The more terms you include in the Taylor series, the more iterations you are able to skip. So if you stay below say 50 terms, it is not likely that you ever encounter any issues. Because some views can be correctly rendered 1000 or 100,000 times faster than full precision for each pixel with many terms - can you imagine a month turned into seconds!  shocked
    K.I.Martin originally used only 3 terms
The link lycium provided is the best introduction, however it doesn't include Pauldelbrot's glitch detection method any only use 3 Series Approximation terms
Logged

Want to create DEEP Mandelbrot fractals 100 times faster than the commercial programs, for FREE? One hour or one minute? Three months or one day? Try Kalles Fraktaler http://www.chillheimer.de/kallesfraktaler
http://www.facebook.com/kallesfraktaler
quaz0r
Fractal Molossus
**
Posts: 652



« Reply #4 on: March 19, 2017, 04:33:55 AM »

Quote from: kalles
Me an lycium have somewhat different opinions

 afro
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Deep Mandelbrot 3d Zoom Movies Showcase (Rate My Movie) cKleinhuis 1 3883 Last post May 26, 2007, 10:29:00 AM
by Sockratease
mdz Mandelbrot Deep Zoom Others « 1 2 » jwm-art 17 11316 Last post April 06, 2014, 09:42:21 PM
by cKleinhuis
mandelbrot set deep zoom #3 Movies Showcase (Rate My Movie) SethComposerGuy 0 1776 Last post July 15, 2010, 12:48:54 AM
by SethComposerGuy
mandelbrot set deep zoom #7 Movies Showcase (Rate My Movie) SethComposerGuy 2 2028 Last post September 04, 2014, 06:05:41 PM
by Mrz00m
mandelbrot set deep zoom #9 Movies Showcase (Rate My Movie) SethComposerGuy 2 2027 Last post July 15, 2010, 03:49:18 PM
by Thunderwave

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