glitches with high order series approximation used for large images

  • 6 Replies
  • 635 Views

0 Members and 1 Guest are viewing this topic.

Offline claude

  • *
  • 3f
  • ******
  • Posts: 1442
    • mathr.co.uk
« 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.

Linkback: https://fractalforums.org/kalles-fraktaler/15/glitches-with-high-order-series-approximation-used-for-large-images/222/
« Last Edit: February 11, 2018, 07:42:21 AM by 3DickUlus, Reason: fixed links »

Offline Dinkydau

  • *
  • Fractal Furball
  • ***
  • Posts: 271
    • DeviantART gallery
« Reply #1 on: September 07, 2017, 06:27:10 PM »
Here's some information about the glitches in the image that was asked about:

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.

Offline knighty

  • *
  • Fractal Feline
  • **
  • Posts: 195
« 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.

Offline claude

  • *
  • 3f
  • ******
  • Posts: 1442
    • mathr.co.uk
« 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.

Offline knighty

  • *
  • Fractal Feline
  • **
  • Posts: 195
« 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...

download here.

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.

Offline claude

  • *
  • 3f
  • ******
  • Posts: 1442
    • mathr.co.uk
« 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!

Offline knighty

  • *
  • Fractal Feline
  • **
  • Posts: 195
« 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.


xx
How to Get More Than 3 Series Approximation Terms?

Started by Byte11 on Fractal Mathematics And New Theories

16 Replies
1080 Views
Last post December 21, 2017, 09:09:44 AM
by knighty
xx
Series approximation for the Burning Ship

Started by claude on Fractal Mathematics And New Theories

0 Replies
212 Views
Last post September 27, 2018, 06:05:07 PM
by claude
clip
using Misiurewicz points for perturbation and/or series approximation

Started by claude on Fractal Mathematics And New Theories

19 Replies
1280 Views
Last post November 10, 2017, 01:46:31 AM
by gerrit
xx
Feature Requests: High Bit Depth Images, Alpha Channel

Started by artao on Mandelbulb3d

1 Replies
298 Views
Last post February 13, 2019, 10:50:35 PM
by Fitz
clip
Large Delta with Perturbation

Started by mrmath on Fractal Mathematics And New Theories

5 Replies
427 Views
Last post December 13, 2017, 12:32:07 AM
by Byte11