Kalles Fraktaler 2.14

  • 111 Replies
  • 4814 Views

0 Members and 1 Guest are viewing this topic.

Offline claude

  • *
  • 3f
  • ******
  • Posts: 1272
    • mathr.co.uk
« on: September 27, 2018, 09:56:44 PM »
I started work on new branch for more experimental stuff, now that 2.13 is getting more stable (it will still have bugfixes for a while longer, as will 2.12).

Latest downloads for this branch can be found at: https://mathr.co.uk/kf/kf.html#kf-2.14
Browse the code in this branch at: https://code.mathr.co.uk/kalles-fraktaler-2/shortlog/refs/heads/kf-2.14

Release announcement for kf-2.14.1 https://mathr.co.uk/kf/kf.html#kf-2.14.1
        - new feature: series approximation for Burning Ship power 2, using case analysis to know how it gets reflected at each iteration
        - two new formulas: General Quadratic Minus, General Quadratic Plus;  "RedShiftRider factor A" sets coefficients (suggested by gerrit)
        - new feature: "Fast" preset activated by default
        - new feature: GUI menus reorganized to make more sense and updated the manual to reflect this
        - new feature: "check for updates" option in the file menu (requires internet access)
        - new feature: 1/4 and 1/2 threads per CPU settings (minimum 1 thread)
        - new feature: optional use of d/dZ in autoskew escape (suggested by gerrit)

The series approximation is not perfect, there can be overskipping due to insufficient probe points on the boundary.  But it's a start...


Linkback: https://fractalforums.org/kalles-fraktaler/15/kalles-fraktaler-2-14/1916/

Offline gerrit

  • *
  • 3f
  • ******
  • Posts: 1840
« Reply #1 on: October 01, 2018, 07:50:17 PM »
Thanks for all that.
Small bug: When you open the program the aspect ratio is 640X379 instead of 640X360.

Offline claude

  • *
  • 3f
  • ******
  • Posts: 1272
    • mathr.co.uk
« Reply #2 on: October 01, 2018, 11:20:46 PM »
Thanks for the bug report.  Fixed in my git version.  Here I got "window size" of 640x378 and "image size" of 640x360.

Turns out the issue was subtle: KF creates the window size at 200x200, and resizes it later to make the canvas area 640x360 pixels.  Its resizing calculations got confused by the (newly rearranged) menus now taking up 2 lines at 200x200, so it was off by the height of the second menu line.  The fix I implemented is just to create the window at 640x360 instead of 200x200, at which size the rearranged menu still takes up 1 line.

Offline gerrit

  • *
  • 3f
  • ******
  • Posts: 1840
« Reply #3 on: October 02, 2018, 04:26:33 AM »
Feature request 1: A kbd shortcut for "reset skew". Exploring with skew often requires backing up and resetting skew which now takes a C-K and 2 mouseclicks.

Feature request 2: Enable rotation (C-T) of an image with skew.

The SA for B-ship seems to work fine, but is often slower than without SA. Of course, as you say, it's just a start and pretty cool.


Offline gerrit

  • *
  • 3f
  • ******
  • Posts: 1840
« Reply #4 on: October 02, 2018, 07:57:23 PM »
If you try to just look at current skew (C-K) and then hit cancel button or ESC, skew gets reset.
PS It does not always happen. Attached location where it does.
« Last Edit: October 03, 2018, 03:51:23 AM by gerrit »

Offline claude

  • *
  • 3f
  • ******
  • Posts: 1272
    • mathr.co.uk
« Reply #5 on: October 05, 2018, 11:17:08 PM »
If you try to just look at current skew (C-K) and then hit cancel button or ESC, skew gets reset.
PS It does not always happen. Attached location where it does.

Can't reproduce, even with that location.  Ctrl-K ESC does corrupt the view if I do it during rendering, but refreshing F5 fixes it (no change in skew).

Offline claude

  • *
  • 3f
  • ******
  • Posts: 1272
    • mathr.co.uk
« Reply #6 on: October 05, 2018, 11:24:49 PM »
Feature request 1: A kbd shortcut for "reset skew". Exploring with skew often requires backing up and resetting skew which now takes a C-K and 2 mouseclicks.
Maybe I could make Ctrl-Shift-K reset skew. (EDIT did this, also Ctrl-Shift-T to reset rotation).  But better time spent would be infinite undo history (so Ctrl-Z/Ctrl-Y to undo/redo most "parameter" stuff, not sure what to do about "settings" stuff).  On the todo list... EDIT implemented undo/redo - not perfect yet, redo is a bit temperamental it seems...

Quote
Feature request 2: Enable rotation (C-T) of an image with skew.
Would be nice, but is non-trivial.  KF currently has only 1 rotation and 1 (only horizontal) skew factor.  For full generality of transformations there needs to be another variable, which obviously makes it backwards incompatible.  And of course it would be nice to load old parameters, and have graceful fallback to older versions too (eg: skew is preserved, just the final post-skew rotation is missing).  So I want to get the design right before committing to it.

Quote
The SA for B-ship seems to work fine, but is often slower than without SA. Of course, as you say, it's just a start and pretty cool.
I think the terms could be set low even for large images, as for most views it'll be stopped by the fold at 1 period of the central attractor if nothing else... so not much opportunity for skipping.
« Last Edit: October 06, 2018, 01:37:53 AM by claude, Reason: ctrl-shift »

Offline gerrit

  • *
  • 3f
  • ******
  • Posts: 1840
« Reply #7 on: October 06, 2018, 12:45:25 AM »
Can't reproduce, even with that location.  Ctrl-K ESC does corrupt the view if I do it during rendering, but refreshing F5 fixes it (no change in skew).
Works, didn't think of trying F5.

Offline gerrit

  • *
  • 3f
  • ******
  • Posts: 1840
« Reply #8 on: October 06, 2018, 03:37:13 AM »
[rotate after skew]
Would be nice, but is non-trivial.  KF currently has only 1 rotation and 1 (only horizontal) skew factor.  For full generality of transformations there needs to be another variable, which obviously makes it backwards incompatible.  And of course it would be nice to load old parameters, and have graceful fallback to older versions too (eg: skew is preserved, just the final post-skew rotation is missing).  So I want to get the design right before committing to it.
You could just extract 2 rotations and one skew from the accumulated transformation matrix T = R2*Skew*R1, where R2 is a new parameter to be saved, but set to identity if not in param file. Some octave code below:
Code: [Select]
skew = 1/rand;
S = [skew 0;0 1];
S = S/sqrt(abs(det(S)));
th = rand * 2*pi;
R1 = [cos(th) sin(th);-sin(th) cos(th)];
th = rand * 2*pi;
R2 = [cos(th) sin(th);-sin(th) cos(th)];
% transform: rotate, skew, rotate again
T = R2*S*R1;
% skew again and rotate again:
skew = 1/rand;
S = [skew 0;0 1];
S = S/sqrt(abs(det(S)));
th = rand * 2*pi;
R3 = [cos(th) sin(th);-sin(th) cos(th)];
%T = R3*S*T;
% recover r2 s r1 from T = r2*s*r1:
[u,s,v] = svd(T);
if(det(u)<0)
   a = [1 0;0 -1];
   u = u*a;
   v = v*a;
end
r2 = u;
s = s;
r1 = v';
% is zero:
r2*s*r1-T

Offline claude

  • *
  • 3f
  • ******
  • Posts: 1272
    • mathr.co.uk
« Reply #9 on: October 06, 2018, 10:14:15 PM »
SVD may be quite heavyweight, and I already have a 2x2 polar decomposition implementation.  Polar decomposition gives K R D^{-1} S D where K is uniform scaling, R,D are rotations and S is a stretch [sqrt(s),0;0,1/sqrt(s)].  The hard part (for me) is in the GUI code, how to edit the R,D,S of an already rotated and skewed image in an intuitive way.

Perhaps one could mark a fixed origin point and a movable control point (whose original angle to control point sets D), and move the control point constrained by angle D to set S by length relative to the length at the start position.  And K,R could be set by moving two control points relative to each other. Eventually (probably never) multitouch: 2x touch pinch to zoom/rotate, 2x2 touch (two handed) to stretch?

The in-file representation is another matter, but one where it's much more important to get the design right first time to avoid having to support multiple variants forever.  Third-party tools might need to support whatever is chosen too, so something sensible that they can work with would be good

Maybe simply storing a 2x2 transformation matrix would be the way to go?  det=1 would be ensured when saving, det>0 would be required when loading - sounds reasonable?  Then storing "Transform: 1.0,0.0,0.0,1.0" in the KFR file later than "Rotate: 0.0" and "Ratio: 360.0" keys would be enough to override them on load, and this key would simply be ignored in earlier versions.  New KF would save Rotate and Ratio as well, to work with old KF, but old KF would lose any post-skew rotation.

There may end up with confusion if someone edits a KFR to update Rotate or Ratio and new KF version loads the Transform key instead? Maybe suggest in documentation to delete any existing Transform key if manually editing Rotate or Ratio?  And to ensure any Transform key is later in the file than any Rotate or Ratio key?

Offline gerrit

  • *
  • 3f
  • ******
  • Posts: 1840
« Reply #10 on: October 07, 2018, 01:27:04 AM »
I guess there are many ways to skin the cat.
Simplest seems to me to just keep track of the transformation T (det(T)=1) and for saving decompose it as T = R2*S*R1 with R2 R1 rotations and S x-stretch matrix so you just have to add R2 to the kfr file (and set to I if not there). Looks like polar decomp. and svd both give you that decomposition.
Not sure I get the difficulty with the GUI, can't you just rotate as normal on an already rotated/stretched image and then T --> R3*T?

Offline gerrit

  • *
  • 3f
  • ******
  • Posts: 1840
« Reply #11 on: October 14, 2018, 03:26:00 AM »
Something wrong with ADE on this one. Works fine in previous versions.

Offline gerrit

  • *
  • 3f
  • ******
  • Posts: 1840
« Reply #12 on: October 16, 2018, 05:32:14 AM »
better time spent would be infinite undo history (so Ctrl-Z/Ctrl-Y to undo/redo most "parameter" stuff, not sure what to do about "settings" stuff).  On the todo list... EDIT implemented undo/redo - not perfect yet, redo is a bit temperamental it seems...
This would of course be nice to have, but I just save periodically when deep zooming, and that works fine.

IMHO a more useful feature would be render saving, so if your render needs to be interrupted after 2 days you don't lose your work.
Ultra Fractal has a "job queue" and the render state gets saved at some regular interval (1 h or so). That works really well.

Offline claude

  • *
  • 3f
  • ******
  • Posts: 1272
    • mathr.co.uk
« Reply #13 on: October 16, 2018, 08:30:29 AM »
If there is to be a "autosave render state" there better be a "resume saved render state" to make it useful.  There will need to be enough disk space for 2 render states, to avoid the issue of crashes happening during save corrupting everything anyway.  Hence needs to be enabled by an option.  On the todo list!

Offline CFJH

  • *
  • Fractal Flamingo
  • ****
  • Posts: 348
« Reply #14 on: October 22, 2018, 08:51:00 PM »
Hello,

I'm testing with kf 2.14.1 (27.9.2018m 64bit-version, os: opensuse 14.3)

Bug1: when rendering a zoom out, at a certain point, all images are broken (see kf_zoomout_failed.jpg).
How to reproduce (occurs on the presets "fast" and "best" in the same way - the images are slightly different):
1. start kf 2.14.1
2. set "reuse reference"
3. load the file "fail_start.jpg"
4. set zoom size to "custom" and enter 1024
5. create the zoom out sequence (storing .jpg only at quality 50%)

Bug2: when changing the thread/cpu setting during a running zoom out sequence, the program crashes (see attachment kf_crash.jpg)

Suggestion: when running a newton-raphson-zoom (takes two weeks on my slow computer) it is good to have a save point when the computer crashes.

Jrgen


xx
Kalles Fraktaler 2 + GMP

Started by claude on Kalles Fraktaler

232 Replies
9939 Views
Last post September 12, 2019, 10:27:53 PM
by claude
xx
Kalles Fraktaler 2.13

Started by claude on Kalles Fraktaler

90 Replies
4133 Views
Last post March 20, 2019, 05:32:26 AM
by claude
xx
Another version of Kalles Fraktaler?

Started by greentexas on Kalles Fraktaler

9 Replies
942 Views
Last post September 22, 2017, 02:59:16 PM
by greentexas
question
Kalles Fraktaler tiled rendering

Started by Chronicler1701 on Kalles Fraktaler

5 Replies
313 Views
Last post September 06, 2018, 07:43:16 PM
by gerrit
xx
Kalles Fraktaler Movie Maker64

Started by Bill Snowzell on Fractal movie gallery

0 Replies
229 Views
Last post February 01, 2018, 09:29:04 PM
by Bill Snowzell