News for hackers. Stuff that matters.
Re:Optimization Example: Mandelbrot Set (part 1) by QuadmasterXLII on Monday February 19, 2024 @12:16PM (#39432198)
The state of the art for arbitrary precision is in rapid flux right now. The naive approach is O(pixels * iterations * bits_precision^2) which is just hopeless. K. L. Martin[1] took it to O(iterations * bits_precision^2 + pixels * iterations) which was a massive improvement. I explain my webgl implementation of that algorithm here [2] and I think it's currently the fastest web implementation for depths up to 2000 bits. However, in 2022 Zhouran [3] dramatically improved the constant factor for the first term, then made a breakthrough in overall complexity, taking it to O(pixels * log(iterations) + iterations * bits_precision^2) which blows the approach I used out of the water for deep images. It's so recent that there's not really a blog post properly explaining it anywhere, you just have to sort through the forum thread., There is a webassembly implementation at https://fraktaler.mathr.co.uk/live/latest/ with public source.

1 http://www.science.eclipse.co.uk/sft_maths.pdf

2 https://www.hgreer.com/JavascriptMandelbrot/

3 https://fractalforums.org/fractal-mathematics-and-new-theori...

Re:Optimization Example: Mandelbrot Set (part 1) by dahart on Monday February 19, 2024 @12:45PM (#39432512)
Thanks for this; I’ve been meaning to work through the ‘perturbation theory’ stuff and implement a deep zoom capable Mandel myself one of these years.

What are the options today for doing this stuff on a GPU? The core of these techniques is to have pre-computed an arbitrary precision orbit, right? Does that mean in practice that the reference orbit is computed on the CPU, and rendering could optionally be done on the GPU? Does anyone compute reference orbits on the GPU?

Re:Optimization Example: Mandelbrot Set (part 1) by QuadmasterXLII on Monday February 19, 2024 @01:20PM (#39432939)
No one knows how to accelerate computing the reference orbit with a GPU yet- I'm hopeful we'll find a way! Until then, yeah computing the reference orbit on CPU and then sending it to the GPU is the usual approach.
Re:Optimization Example: Mandelbrot Set (part 1) by sigil on Monday February 19, 2024 @12:24PM (#39432275)
Incredible reply, thanks! The Mandelbrot set is my Hello World when learning new graphics APIs, and I was learning WebGL with it recently. Immediately ran into the precision issues you describe in [2]!