纵向尺寸n=0
solve
n*(n+1)*(2*n+1)/6=idx1
for n
k=0
solve
k*(k+1)*(2*k+1)/6=p9
for k
j=ceil(n)
i=idx1-j*(j+1)*(2*j+1)/6
if i==0
memb_i=-a*j-b*j+a/2
else
if ceil(i/j)-i/j==0
memb_i=-a*(j-1)-b*(j-1)
else
memb_i=a+b
endif
endif
横向尺寸
n=0
solve
n*(n+1)*(2*n+1)/6=idx1
for n
k=0
solve
k*(k+1)*(2*k+1)/6=p9
for k
j=ceil(n)
i=idx1-j*(j+1)*(2*j+1)/6
if i==0
memb_i=-a*j-b*j+a/2
else
if ceil(i/j)-i/j==0
memb_i=a+b
else
memb_i=0
endif
endif
基准尺寸
n=0
solve
n*(n+1)*(2*n+1)/6=idx1
for n
k=0
solve
k*(k+1)*(2*k+1)/6=p9
for k
memb_v=-a*floor(n)