• March 03, 2021, 09:54:22 PM

Login with username, password and session length

Author Topic:  towards a common file format for 2D escape time iteration data  (Read 2306 times)

0 Members and 1 Guest are viewing this topic.

Offline 3DickUlus

  • Administrator
  • *******
  • Posts: 2059
    • Digilantism
Re: towards a common file format for 2D escape time iteration data
« Reply #15 on: August 25, 2020, 06:16:14 AM »
@unassigned EXR can use libz, when initializing the file header use
Code: [Select]
header.compression() = ZIP_COMPRESSION; when reading the file EXR lib detects this and decompresses data on the way to the framebuffer.

Offline unassigned

  • Fractal Phenom
  • ****
  • Posts: 49
Re: towards a common file format for 2D escape time iteration data
« Reply #16 on: August 25, 2020, 07:19:06 AM »
@unassigned EXR can use libz, when initializing the file header use
Code: [Select]
header.compression() = ZIP_COMPRESSION; when reading the file EXR lib detects this and decompresses data on the way to the framebuffer.


Thanks for the tip, I was just trying to mention that the PIZ compression mode worked better than the ZIP modes however rounds the smooth factors from f32 to f24. I guess these could be stored as f16, however at the moment it seems alright.

Offline unassigned

  • Fractal Phenom
  • ****
  • Posts: 49
Re: towards a common file format for 2D escape time iteration data
« Reply #17 on: October 20, 2020, 05:45:46 AM »
Hi, just a question about how DEX/DEY are implemented. In my program I have the analytic derivative and this is converted using the estimate formula, followed by dividing it by the pixel spacing and using the hyperbolic tangent of this to force it to be between 0.0 and 1.0. I multiply this by the unit vector of the derivative to get the direction. Is this the same way that is in KF?

I have done some tests and it does not seem to be correct...

Offline claude

  • 3f
  • ******
  • Posts: 1788
    • mathr.co.uk
Re: towards a common file format for 2D escape time iteration data
« Reply #18 on: October 20, 2020, 11:31:25 AM »
This is how kf-2.15 does it (which should give compatible output to earlier versions, in a less convoluted way):

T: the number type, double or long double or floatexp (used when more range is needed)
Zr, Zi: the final escaped Z value
Jxa, Jxb, Jya, Jyb: the running derivative (for complex analytic formulas Jxa = Jyb and Jxb = - Jya, aka Cauchy-Riemann conditions)
s: the pixel spacing
TK: the rotation and skew matrix (if you don't rotate or skew then this should be the identity matrix)

don't do any tanh stuff, that's only for colouring

Code: [Select]
template<typename T>
inline complex<double> compute_de(T Zr, T Zi, T Jxa, T Jxb, T Jya, T Jyb, T s, const mat2 &TK)
{
  vec2 u = { double(Zr), double(Zi) };
  mat2 J = { double(Jxa * s), double(Jxb * s), double(Jya * s), double(Jyb * s) };
  complex<double> v(u[0], u[1]);
  double num = abs(v) * log(abs(v));
  vec2 den = normalize(u) * (transpose(J) * TK);
  return num / complex<double>(den[0], den[1]);
}

vec2 and mat2 are aliases for glm::dvec2 and glm::dmat2, check how glm library (GLSL compatible) does it if you get wrong results (probably matrices are transposed from what you want).

Online sjhalayka

  • Fractal Fruit Salad
  • *****
  • Posts: 69
Re: towards a common file format for 2D escape time iteration data
« Reply #19 on: October 21, 2020, 12:00:05 AM »
Included with this post is a picture of the escape paths that do not reach infinity, where Z' = Z^5 + C. The paths are drawn as cylinders following Bezier curves.

I have also looked into the different measurements that you can make on the escape path data. For instance, we generally focus on the magnitude of the escape path end point, but we can also measure the length of the escape path, as well as the displacement.

I wrote a paper on this: https://vixra.org/abs/1906.0407

There are quite a few diagrams, to reduce the amount of misunderstanding. For instance, the table at the end of the paper (see page 18) shows that all three (magnitude, length, and displacement) produce practically the same sets. This was not expected, given that the histograms in the paper are not quite alike (see page 16).

Offline unassigned

  • Fractal Phenom
  • ****
  • Posts: 49
Re: towards a common file format for 2D escape time iteration data
« Reply #20 on: October 21, 2020, 12:49:29 AM »
This is how kf-2.15 does it (which should give compatible output to earlier versions, in a less convoluted way):

T: the number type, double or long double or floatexp (used when more range is needed)
Zr, Zi: the final escaped Z value
Jxa, Jxb, Jya, Jyb: the running derivative (for complex analytic formulas Jxa = Jyb and Jxb = - Jya, aka Cauchy-Riemann conditions)
s: the pixel spacing
TK: the rotation and skew matrix (if you don't rotate or skew then this should be the identity matrix)

I've tried to implement this and I have an output that although shows the correct shape in KF, still does not look exactly the same. If I have the derivative as a complex number (in this case in floatexp form) does this imply that:

- Jxa = re(derivative)
- Jyb = im(derivative)

Mandelbrot iteration is analytic so C-R holds right so they can be used to find the other values? I also currently rotate before the pixel C values are even assigned so I don't think that rotation or skew is needed

Offline claude

  • 3f
  • ******
  • Posts: 1788
    • mathr.co.uk
Re: towards a common file format for 2D escape time iteration data
« Reply #21 on: October 21, 2020, 11:08:16 AM »
Jxa = Jyb = Re(dz/dc), Jya = -Jxb = Im(dz/dc)

you may need to rotate and skew the DE to make it correspond to screen space rather than complex plane, whether you want to do it depends on how you want to colour it.  In kf I compare with screen space numerical differences based DE and aim for them to be similar.

Offline unassigned

  • Fractal Phenom
  • ****
  • Posts: 49
Re: towards a common file format for 2D escape time iteration data
« Reply #22 on: October 22, 2020, 08:38:57 AM »
I'm pretty sure I've got it working now, thanks for the help. Just a question, did you have any software that can be used to view the 'phase' (I think the direction of the derivative) of the DE as well as the value?

Offline claude

  • 3f
  • ******
  • Posts: 1788
    • mathr.co.uk
Re: towards a common file format for 2D escape time iteration data
« Reply #23 on: October 22, 2020, 08:50:51 AM »
zoomasm has a rainbow-fringe.glsl preset that shows argument of DE as hue and magnitude as value and saturation, but zoomasm expects a sequence of exponential map strip keyframes as input, not flat frames - I may write a standalone flat frame thing that takes the same GLSL snippets (which will be useful for recolouring single images, rather than animations), and eventually try to get it working in KF directly

also, just in case of confusion, the EXR phase channel "T" is something different (based on the argument of the first Z value to escape)


xx
kfb file format

Started by gerrit on Kalles Fraktaler

2 Replies
488 Views
Last post January 09, 2018, 06:11:45 PM
by gerrit
xx
Standardized color mapping file format

Started by patched on Fractal Programs Discussion, Help, & Support

7 Replies
891 Views
Last post December 03, 2020, 04:16:09 PM
by Adam Majewski
clip
Escape Time Blur

Started by AlexH on Share a fractal

0 Replies
587 Views
Last post August 15, 2018, 05:42:06 AM
by AlexH
clip
Inverse tree generation (escape-time like)

Started by msltoe on Fractal Mathematics And New Theories

33 Replies
2046 Views
Last post October 09, 2018, 01:55:51 PM
by Sabine62
clip
Fourier series in escape time fractals

Started by v on Fractal Mathematics And New Theories

0 Replies
397 Views
Last post December 19, 2018, 07:32:09 PM
by v