Now, I think I know how to convert multiple set of vectors into diag.
So far, I got this.
rep_hamiltonian:
if s>1 to_gray. fi
n={$1}
npts={sqr($n)}
npts_n={$npts-$n}
npts_1={$npts-1}
#x_intervals image#
200,1,1,1,":begin(const ww=w-1);lerp(0,1,x/ww)"
increment={sqr(i(#-1,1))}
incrementValue={-1/$increment}
zeroV={4/$increment}
diag0={vector(#$npts,$zeroV)}
rm.
repeat $! l[$>]
$npts_n,1,1,1,"begin(
const inc_v="$incrementValue";
);
inc_v*i(#-1,x);"
$npts_1,1,1,1,"begin(
const inc_v="$incrementValue";
);
inc_v*i(#-2,x);"
diagmN=[{crop(#-2)}]
diagm1=[{crop(#-1)}]
rm[-2,-1]
size_diag={narg($diag0)}
$size_diag,$size_diag,1,1
5,1,1,1,"begin(
diagmN="$diagmN";
diagm1="$diagm1";
diag0=["$diag0"];
d_size="$size_diag";
initial_pos_x=[0,0,0,1,"$n"];
initial_pos_y=["$n",1,0,0,0];
);
xpos=initial_pos_x[x];
ypos=initial_pos_y[x];
for(p=0,p<d_size,p++,
x==0||x==4?(i(#-1,xpos,ypos)=diagmN[p];):
x==1||x==3?(i(#-1,xpos,ypos)=diagm1[p];):
(i(#-1,xpos,ypos)=diag0[p];);
xpos++;
ypos++;
if(xpos==d_size||ypos==d_size,break());
);
"
rm.
f[0] eig(crop(#-1))
endl done
Didn’t turn out how I wanted.
The 5,1,1,1 create a diag vector on the second last image.
Without the eig code. Here’s what it looks like:
From the chat @weightt_an and I had in discord, the second image needs a fix. But, it’s on the right track. On, +N/-N, there should be more. In other words, there should be more thickness. At this point, all there needs to be is adjusting to the code I have made, and see how to fix it.