• May 06, 2021, 06:53:33 PM

Author Topic: (Question) How to implement Series Approximation in GLSL?  (Read 281 times)

0 Members and 1 Guest are viewing this topic.

Mr Rebooted

• Fractal Phenom
• Posts: 57
(Question)How to implement Series Approximation in GLSL?
« on: November 19, 2020, 02:54:34 PM »
I've seen that Perturbation Theory also comes with Series approximation. How would I implement this in OpenGL? (Using vec2 and stuff like that)

claude

• 3f
• Posts: 1849
Re: How to implement Series Approximation in GLSL?
« Reply #1 on: November 19, 2020, 04:10:05 PM »
Start by implementing a function for complex multiplication.  Then look at Horner's form for polynomial evaluation.  You can pass small series in a uniform array, larger numbers of terms might be better in texture1d (not sure).  Also note that for higher order series you will want to rescale the coefficients and inputs, because they can get very big and small and can over/underflow.  Ideally you want all the values to be near 1.  gerrit explained that to me once on this forum but I didn't implement it yet, KF just uses floatexp for higher range to avoid the issue (at the cost of speed).

You can calculate the series coefficients on the CPU, it's sequential work so not worth doing on GPU.  You can use the low precision reference orbit (note: you need to compute the reference at high precision, but you can round it for the series calculation and perturbed iterations).  You need to check for "overskipping", KF does this by comparing perturbed iterations vs series approximation for "probe points" (8 points on the image boundary) and stopping before they diverge too much.

The formula for the series is at https://mathr.co.uk/blog/2016-03-06_simpler_series_approximation.html , not quite optimal (evaluating ab+ba is more costly than 2ab).

sjhalayka

• Posts: 69
Re: How to implement Series Approximation in GLSL?
« Reply #2 on: November 23, 2020, 10:45:25 PM »
I have put up a small compute shader program example for you:

Changing the shader to do what you want should be relatively straightforward.

Similar Topics

"Time Span"

Started by cricke49 on Fractal Image Gallery

0 Replies
919 Views
August 02, 2018, 07:05:21 AM
by cricke49
How to Get More Than 3 Series Approximation Terms?

Started by Byte11 on Fractal Mathematics And New Theories

16 Replies
1390 Views
December 21, 2017, 09:09:44 AM
by knighty
Series approximation for the Burning Ship

Started by claude on Fractal Mathematics And New Theories

0 Replies
317 Views
September 27, 2018, 06:05:07 PM
by claude
bad analytic DE/slopes when series approximation is disabled

Started by claude on Kalles Fraktaler

4 Replies
177 Views
June 23, 2020, 07:44:35 AM
by claude
using Misiurewicz points for perturbation and/or series approximation

Started by claude on Fractal Mathematics And New Theories

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