• May 19, 2022, 01:22:25 AM

Author Topic:  Arbitrary Precision in GLSL and perturbation theory questions  (Read 401 times)

0 Members and 1 Guest are viewing this topic.

Offline matigekunstintelligentie

  • Fractal Freshman
  • *
  • Posts: 9
Hey all, this is my first post on this forum! I have written a GLSL shader that renders the Mandelbrot/Julia set and I've run into precision problems. I have been able to render fractals on the CPU with arbitrary precision libraries such as GMP. The reason why I switched to rendering on the GPU is that I now have live video orbit traps with shading. I want to keep this and also have the option to do arbitrary precision. Is there any way I can pass an arbitrary precision float to a GLSL shader? Or is there a known way of converting an arbitrary precision float into e.g. a texture or multiple floats?

My ultimate goal is to eventually implement K.I. Martin's perturbation method. I might not understand it correctly, maybe the questions above are invalid due to a misunderstanding of the theory. Here's how I think it works:

1. Pick a Xn
2. Calculate Xn for each n in 0...max iter(?) in arbitrary precision.
3. Calculate An, Bn, and Cn for each n in 0...max iter(?) in arbitrary precision.
4. Send values from 1 and 2 to shader once
5. Calculate delta 0 in single floating-point precision(?)
6. Check whether delta0**3<<delta0**2
7. Calculate delta n
8. Calculate Yn
9. Skip iterations and profit

I hope this is correct. Probably not:) I can't find K.I. Martins superfractalthing website anymore, I'm basing this off an old PDF I had on my computer. I'm unsure which parts are supposed to be done in arbitrary and single floating-point precision.

Programming in C++ is new to me and I wish I had a background in math ;D, but this has been the most interesting and beautiful challenge so far. Any good resource is very welcome! I'm also interested in implementing my own arbitrary precision code if necessary.

Linkback: https://fractalforums.org/index.php?topic=3564.0

Offline claude

  • 3f
  • ******
  • Posts: 2202
    • mathr.co.uk
Re: Arbitrary Precision in GLSL and perturbation theory questions
« Reply #1 on: June 07, 2020, 10:20:59 PM »
The per-pixel iterations can be done in low precision.  Typically you convert on CPU before uploading to GPU (either as OpenGL texture or OpenCL buffer, don't know about CUDA).

The website is archived, https://web.archive.org/web/*/superfractalthing.co.nf scroll back a couple of years to before the domain expired/got parked

I have two GPU-based perturbation renderers, maybe they can inspire you:
https://mightymandel.mathr.co.uk/ (OpenGL + GLSL)
https://code.mathr.co.uk/fractal-bits/tree/6e994959ffbce699482157b25648e7bb2c1cfa0d:/mandelbrot-delta-cl (OpenCL)

Fixed Arbitrary Precision and multiplication

Started by superheal on Programming

10 Replies
Last post March 14, 2022, 12:48:06 PM
by superheal
MandelRender: Optimized (some features removed), and arbitrary precision

Started by Mr Rebooted on Other

0 Replies
Last post September 28, 2021, 10:26:24 PM
by Mr Rebooted
Arbitrary precision Java

Started by superheal on Programming

0 Replies
Last post September 18, 2021, 05:55:18 PM
by superheal
UF extended/arbitrary precision

Started by FractalDave on UltraFractal

0 Replies
Last post September 13, 2018, 04:14:36 PM
by FractalDave
A couple of questions about implementing perturbation for the Mandelbrot set

Started by gornvix on Fractal Mathematics And New Theories

1 Replies
Last post September 06, 2020, 01:30:08 PM
by claude