Given that @David_Tschumperle has been making his own G’MIC adventures series, I thought I could join in the fun. Right now, I looked back at Paul Bourke’s website, and saw samila mappings
.
Here is a example of samila mapping
:
And the explanation goes like this:
Now, I have no idea what this means yet, but I do strongly suspect it is related to one of my code. But, my guess is that it is related to Henon Phase, which I do have code for.
So far, this is my code based on my guess, and it doesn’t look good:
#@cli rep_samila:
#@cli : Test code to test samila mapping
rep_samila:
channels. 0
200%,200%,1,2,"begin(
const shift_x=w#-1/2;
const shift_y=h#-1/2;
const mx=w-1;
const my=h-1;
const cx=mx/2;
const cy=my/2;
const sd=max(w,h)/min(w,h);
const sx=w>h?cx/sd:cx;
const sy=w>h?cy:cy/sd;
const scale_factor=min(cx,cy)*.12;
f1(X,Y)=sqr(X)-sin(sqr(Y))+abs(Y-X);
f2(X,Y)=sqr(Y)-cos(sqr(X))+2*X;
);
X=(x-cx)/sx;
Y=(y-cy)/sy;
result=[f1(X,Y),f2(X,Y)]*scale_factor+[shift_x,shift_y];
++I(#-1,result);
result;
"
I’m a bit rusty with math parser code as all I been doing is refactoring and improving other G’MIC codes, but should be able to pick up regardless.
The above code gives me this:
Source: samila mappings