I am working on trying to replicate this filter in gmic and I certainly do not understand python - GitHub - weightan/SchrodingerWellPython: 2D 3D Time independent FDM Schrodinger equation solver for arbitrary shape of well
This is as far as I got
rep_hamiltonian:
skip ${2=1},${3=0}
#$1=sides#
#$2=radius#
#$3=rotation_ang#
#$4=translate_x#
#$5=translate_y#
sides={max(1,abs($1))}
ang={$3/180*pi}
one_segment={pi*2/$sides}
use_translate=0
#def polygon#
if [$4,$5]!=[0,0] use_translate=1 fi
$sides,1,1,2,"begin(
const use_translate="$use_translate";
const radius=$2;
const ang="$ang";
const os="$one_segment";
translate_coords=[$4,$5];
cv(n)=os*n+ang;
use_translate?(
vf(v)=[sin(v),cos(v)]*radius+translate_coords;
):(
vf(v)=[sin(v),cos(v)]*radius;
);
);
vf(cv(x));
"
How do they go all together?
On inpolygon, it seem to me that inpolygon process a vector. But, how is that translateable to gmic?
general_potential is the core part according to the author of the filter (yes, i chatted with him). So, it can’t be skipped. What does it do exactly?
EDIT: Now I remember @myselfhimself. Pinging him as he qualifies.