function [Knots_n] = linear_3d_grid_from_displ(T, Spacing, volsz)
    ksz = ceil(volsz ./ Spacing) + 1;
    Knots_n =...
        T([1, 1+Spacing(1):Spacing(1):(ksz(1)-1)*Spacing(1), volsz(1)], ...
          [1, 1+Spacing(2):Spacing(2):(ksz(2)-1)*Spacing(2), volsz(2)], ...
          [1, 1+Spacing(3):Spacing(3):(ksz(3)-1)*Spacing(3), volsz(3)], :);
end