Reptorian G'MIC Filters

No wonder I can’t find it :wink: Never heard of that. What will you do with it?

I have asked about the “graph thing” before (if it is what I think you are referring to). Is there much overhead? Is it okay for this simple problem? My interest in it was the possibility of doing subpixel processing.

There’s not much overhead for this case. You can look at it like this: Raise your right-hand in front of you, and make a L. If there exists pixels on any or all two fingers, add it to the list of numbers to exclude.

This variadic function changes a random integer into a integer that is not excluded:

rn_exlc(arg...)=(
    ref([arg],excl_num);
    out_rn=sel_rn;
    repeat(size(excl_num),p,
      out_rn>=excl_num[p]?(
        ++out_rn;
      ):(break(););
    );
    out_rn;
  );

This works as long as you have sel_rn which is a random integer between 0 and the numbers of available numbers. arg... has to consist of unique whole numbers that is in order. Variadic function can take in any numbers of arguments.

Improve Ellsworth Kelly board and making textile making tools down the road.

Hi Reptorian
In G’MIC 3.3.0 (Gimp-2.10.34 Win_10_64bit) for Markus-Lyapunov Fractal filter (in default setting) I get this error:

fx_rep_mlfrac

1 Like

Fixed. I checked for other wrong codes like that, but this is the only one. Thank you. Update later to see that it works.

EDIT: Great, it doesn’t work. :frowning: Anyways, probably still needs a big time refactor.

Okay, I decided to add to the evergrowing list of filters to refactor as well. It’s not a easy fix. I do have more knowledge on G’MIC, so refactoring isn’t that big as it once was for me.

1 Like

I have fixed it. Should be up and ready tomorrow (The picture shows how it should look tomorrow). I’m doing a refactor regardless of its working status.

That being said, I’m laughing at my old code. And knowing how G’MIC interpreter has improved so much to eliminate ambiguous cases, and cases where it does not make sense. Such few cases can be found in my recent github changes to Lyapunov Fractal.

Like these:

case_d1,case_dn={[!($include_a&&$include_b),!(!$case_d1&&$include_c)]}
mode,use_double_u,use_hex_mode,sub=0,{abs($3)+1}

I’ll leave it up to others to see what is wrong with these codes.

2 Likes

Many thanks for the very quick repair.
It’s already working as expected. :grinning:

I’m just gonna save a link here - Lyapunov Fractals | Fractview for Android

Some of those are going to be implemented into the newly refactored Lyapunov Fractal.

Aw no, in order to do the above code, I need to find a way to generate the derivative of a string, so I do not think this is possible to do for now. :frowning:

Well, I can always keep that code I have for later.

Other option is to have a list of string as options, and find d/dn of the math expression string to put as string.

So, I need to know the derivatives:

1) d/dz r*z*sin(z)
2) d/dz r*z*cos(z)
3) d/dz r*cos(z)
4) d/dz r*sin(z)
5) d/dz r*cos(z)*sin(z)
6) d/dz r*z*exp(z)
7) d/dz r*sin(z)*exp(z)
8) d/dz r*cos(z)*exp(z)
  • When I have to compute derivative, I sometimes try with Wolfram Alpha which has awesome resources.

  • Also, if you need to compute derivatives of functions that may be entered by the user (e.g. as a parameter of a filter), then remember that the value of the derivative at a point z can be also approximated by \frac{d}{dz}f(z) \approx \frac{f(z+\epsilon) - f(z)}{\epsilon} or \frac{d}{dz}f(z) \approx \frac{f(z+\epsilon) - f(z - \epsilon)}{2\epsilon}.
    This means derivatives can be numerically computed even if you don’t know the closed forms of the derivative functions.

Looks like I have successfully extended Mitchell Concatenation. I think I do need to run a few more test to make sure.

Negative number leads to the target level at center. That was pretty hard to pull off. Current code is over 1000 lines of code.

EDIT: Did a few more code fixes, and I can’t think of anything more to do or find any bugs. I will do refactor of the GUI version.

1 Like

I repaired my Vibrance [YCH] filter. Apologies if it didn’t work earlier.

I’m up for making gui_toolkit filters. To clarify, they’re cli commands that are only useful for GUI filters. They return global variables for use in dynamic interface. And normally, I avoid global variables unless it’s local to GUI space which this is or last resort thing.

Any ideas? @prawnsushi , @afre, @garagecoder

I’m creating gui_toolkit_pal which is used for GUI filters with variable number of palette colors. See Transfer Colors[Reduced Colors] to see what I mean by that. The purpose of this is to make that thing easier, and if you look at the code, it looks like a mess.

1 Like

Hi,

I’m not sure how i can help you, really :sweat_smile: I don’t think i know enough about the GUI or even G’mic…

On a side note:
I tried Transfer Colors and got some errors when playing with pixels width and height even though it works fine with preview (I left all other settings at default, using gmic-qt 3.3.0).

  • Selecting 8x8 crops the image before resizing it to it’s original size.
  • Selecting 5-7x8 bring the [gmic_gimp_qt]./error/ *** Error in ./ *** inv_inp
  • Selecting something 8x4 works but crops the image like 8x8.
  • These happen when reversing pixels size ( 8x7, etc)
1 Like

I’m struggling to understand what you mean exactly - is it something to make using gui commands easier from the cli? If so, good idea! Do you have an example of how you would use it?

No, it’s to make GUI filters utilizing dynamic GUI easier. I noticed you haven’t done anything involving dynamic GUI, and that can be really, really, difficult to code. The point is to make it easier to code in dynamic GUI filters. I use things like $_persistent to store generated data onto memory within GUI filters too.

Then it could be something to ease the use of status update and change the GUI ( hide/show sliders, etc)?

That’s precisely what it is. Basically returns global variables for easing status update, and enabling storing them into a non-visible gui item as a way to store them in memory, and sometimes add images for use in a GUI filter. This would allow me to cut refactoring work significantly.

I wonder if it were possible to return the list of available variables for use in coding. @David_Tschumperle