I think I’m done now with the prototype for this algorithm.
I’ve tried a lot of different things, and this is what I get at the end:
paint :
+diffusiontensors 0.01,0.95,0.5,1
+gradient_norm..
# +f[0] 255
+b[0] 10%
f=0
repeat inf,t
beta={1-exp(-$t/100)}
100%,100%,1,4
{u(16,512)},1,1,1,"*
const da = 15;
const dl = 1;
const beta = $beta;
const bs = lerp(60,1,beta);
const anisotropy = lerp(0.5,1,beta);
const opac = lerp(0.5,1,beta);
X0 = round(u([w#0,h#0]-1));
RGBA = [ lerp(I(#0,X0),u([255,255,255]),0),255 ];
lmax = lerp(1,10,beta^2);
for (a = 0, a<360, a+=da,
X = X0;
U = [ cos(a°), sin(a°) ];
for (l = 0, l<lmax, l+=dl,
C = I(#1,X,1);
T = [ C[0],C[1],C[1],C[2] ];
eig = eig(T);
l1 = eig[0];
l2 = eig[1];
u = eig[2];
v = eig[3];
RGBA[3] = opac*lerp(10,255,min(1,i(#2,X0)/10));
nbs = bs;
nbs*=lerp(3,1,min(1,i(#2,X0)/20));
ellipse(#-1,X[0],X[1],nbs,nbs*lerp(1,(1 - l1 + l2),anisotropy),atan2(v,u),1,RGBA);
U = T*U;
X+=dl*U;
U/=max(1e-9,norm(U));
);
);" rm.
opac={lerp(0,0.5,$beta)}
blend[3,-1] alpha,{u(0.05,$opac)}
w. -1,-1,0
on. frame.jpg,$f f+=1
done
Next step would be to convert it to a filter for the G’MIC-Qt plug-in…
If only I had the courage to do it!