• November 28, 2021, 03:16:27 AM

### Author Topic:  glitches with high order series approximation used for large images  (Read 899 times)

0 Members and 1 Guest are viewing this topic.

#### claude

• 3f
• Posts: 2078
##### glitches with high order series approximation used for large images
« on: September 07, 2017, 04:18:01 PM »
Not wanting to hijack this image thread on the old forum http://www.fractalforums.com/images-showcase-(rate-my-fractal)/3rd-order-evolution-of-tilings/msg103453/#msg103453
So I repost here:
Quote
Kalles Fraktaler wrote: There is one issue that has been revealed lately that may occur when doing very large resolution, that when the number of terms used in approximation it is possible that glitches are missed. When that occurs the result is that the end points of the pattern becomes blurry, but this seems not be the case with this image.
I think we should ask Claude to limit the number of automatic terms to something like 60.

I could limit the number of terms (any hint where to do this in the code?), but maybe some other solution would be better?  also how to see how many terms are being used for a given render?

maybe choosing the number of probe points (the ones calculated with only perturbation to check the series approximation) according to some formula of the approximation order or image size, using more probe points for larger images and more terms?  If 640x360 uses 8 probe points (just an example, didn't check the code yet), then 16000x9000 should use 5000 to maintain the same ratio of probe points to regular points.  maybe have a tweakable ratio of probe points to image size?

Here is an example of a glitched image with default automatic approximation terms at 16000x9000: wiggly fungus spores glitch
I fixed it by recentering it and I probably manually limited series terms too, but I can't remember exactly - I definitely looked at that part of the GUI so it is a possibility, especially as it took twice as long to render: wiggly fungus spores I attached excerpts of the images too.

« Last Edit: February 11, 2018, 07:42:21 AM by 3DickUlus, Reason: fixed links »

#### Dinkydau

• Posts: 304
##### Re: glitches with high order series approximation used for large images
« Reply #1 on: September 07, 2017, 06:27:10 PM »

Both encircled parts should have been round, but they look morphed.

I got these glitches with the following settings:
65 terms, no approximation low tolerance, bailout=2, 40100100 iterations

It may be simply due to not using approximation low tolerance.

#### knighty

• Fractal Furball
• Posts: 205
##### Re: glitches with high order series approximation used for large images
« Reply #2 on: September 09, 2017, 12:39:33 AM »
It reminds me that issue with "light years away" location (with 128 coefficients and 313 088 skipped iterations).

This is what I get using automatic stopping criterion (1072456 skipped iteration) and when skipping less iterations (1067000 skipped iterations).

The per pixel error detection doesn't show anything. The green shades here are just to see if/where we loose precision when evaluating the series approximation. IMHO it is not the case here. There is something else, Maybe some coefficients are completely wrong. The only way to be sure is to compute them at higher precision...

The red crosses are at the roots of the series approximation polynomial that are found while iterating. This is only a proof of concept, nothing finished. It is faster than what I expected, mainly because we need to solve only at some iterations (maybe 3 or 4). What is interesting is that this kind of glitches occurs at locations where we already found a root at a previous iteration.

#### claude

• 3f
• Posts: 2078
##### Re: glitches with high order series approximation used for large images
« Reply #3 on: September 10, 2017, 06:48:47 PM »
The roots of the series approximation are good candidates for new reference points.  I guess you need to solve for roots only when the largest absolute term minus all the others is negative?  Maybe some kind of recursive subdivision algorithm could add references at the roots without needing to recompute so much?  Alternatively (and perhaps simpler) at iterations where roots occur, it could scan the whole image to work out which pixels won't be series-approximated accurately (how?), and initialize them at the previous iteration... so different pixels would be series-approximated at different iterations, which might complicate some parts of the algorithm (also need to store per-pixel iteration count).

I'm currently testing with a larger number of probe points (1 probe point per every 65536 pixels, so around 2200 probe points for 16000x9000). If I'm reading the interface right, it's skipping far fewer iterations, so hopefully the glitch is avoided.  Now it is displaying A:1% when before it was A:27%, with R:31%.  I expect it to take until tomorrow to finish rendering...  then I'll test again with the higher tolerance to see if the additional probe points help enough there.

#### knighty

• Fractal Furball
• Posts: 205
##### Re: glitches with high order series approximation used for large images
« Reply #4 on: September 10, 2017, 10:42:12 PM »
Here is my hyper slowly advancing Mandelbrot set deep zoom application. It uses imgui and tinyFileDialogs. The root finding is already implemented. It is based on interval arithmetic and subdivision. It is functional but not finished yet because there are a lot of issues: It becomes slow (sometimes very slow) when the distances between some roots are very small. This happens particularly at period doubling, quadrupling...etc. I used some hacks to avoid those cases but still unsatisfactory... Maybe, Durand-Kerner method would give better results...

PS: I used Qt as an IDE. It doesn't need Qt libraries. The dependencies are: SDL2+openGL and mpreal. imgui and tinyFileDialogs are already included in the archive.

#### claude

• 3f
• Posts: 2078
##### Re: glitches with high order series approximation used for large images
« Reply #5 on: September 13, 2017, 12:32:43 AM »
Here is my hyper slowly advancing Mandelbrot set deep zoom application. It uses imgui and tinyFileDialogs.
...
PS: I used Qt as an IDE. It doesn't need Qt libraries. The dependencies are: SDL2+openGL and mpreal. imgui and tinyFileDialogs are already included in the archive.

Cool! I got it working.

On Debian, I needed to install libmpfrc++-dev to get <mpreal.h> (not <mpfr/mpreal.h>) and libsdl2-dev for SDL2, and I made these changes:

Code: [Select]
--- README.md.orig 2016-11-28 01:05:24.000000000 +0000+++ README.md 2017-09-12 23:26:21.664884596 +0100@@ -11,7 +11,7 @@ - On Linux and similar Unixes  -c++ sdl2-config --cflags -I ../.. main.cpp imgui_impl_sdl.cpp ../../imgui*.cpp sdl2-config --libs -lGL -o sdl2example+c++ sdl2-config --cflags -I imgui main.cpp imgui_impl_sdl.cpp imgui/imgui.cpp imgui/imgui_draw.cpp imgui/imgui_demo.cpp TinyFileDialogs/tinyfiledialogs.c MBdeepzoom/mb.cpp MBdeepzoom/MBImage.cpp sdl2-config --libs -lmpfr -lGL   - On Mac OS X--- MBdeepzoom/mb.cpp.orig 2017-09-12 23:14:01.168534621 +0100+++ MBdeepzoom/mb.cpp 2017-09-12 23:15:54.604269108 +0100@@ -44,7 +44,7 @@  #include <vector> -#include <mpfr/mpreal.h>+#include <mpreal.h>  #include "mbimage.h"
Looking forward to reading the code in the coming days.  Thanks!

#### knighty

• Fractal Furball
• Posts: 205
##### Re: glitches with high order series approximation used for large images
« Reply #6 on: September 13, 2017, 01:51:54 PM »
Good to know.
I got mpreal from here: http://www.holoborodko.com/pavel/mpfr/
That's why I've put it in "mpreal" sub-directory. It uses mpfr which hopefully comes with msys64/gcc.

### Similar Topics

###### How to Get More Than 3 Series Approximation Terms?

Started by Byte11 on Fractal Mathematics And New Theories

16 Replies
1526 Views
December 21, 2017, 09:09:44 AM
by knighty
###### Series Approximation for other powers

Started by superheal on Programming

9 Replies
231 Views
September 13, 2021, 01:16:26 PM
by claude
###### Series approximation for the Burning Ship

Started by claude on Fractal Mathematics And New Theories

0 Replies
337 Views
September 27, 2018, 06:05:07 PM
by claude
###### How to implement Series Approximation in GLSL?

Started by Mr Rebooted on Programming

2 Replies
319 Views
November 23, 2020, 10:45:25 PM
by sjhalayka
###### using Misiurewicz points for perturbation and/or series approximation

Started by claude on Fractal Mathematics And New Theories

19 Replies
1654 Views
November 10, 2017, 01:46:31 AM
by gerrit