clear all;clf
f2=fopen("c3.bin","rb+");coord=fread(f2,[31916,3],"double");fclose(f2);
f2=fopen("c4.bin","rb+");coordnum=fread(f2,[102,1],"double");fclose(f2);
limits = [min([coord(:,1)]), max([coord(:,1)]) ,...
min([coord(:,2)]), max([coord(:,2)]),...
min([coord(:,3)]), max([coord(:,3)])];
xlabel("x");ylabel("y");zlabel("z");
invs=@(n) line("xdata",coord(coordnum(n):coordnum(n+1),1), ...
"ydata",coord(coordnum(n):coordnum(n+1),2), ...
"zdata",coord(coordnum(n):coordnum(n+1),3),"color", "b", "marker", "none");
axis ("equal",limits);
view(3);
xlabel("x");ylabel("y");zlabel("z");
g_step=20;
Nr=1:g_step:rows(coordnum);
hl1=arrayfun(invs, Nr);
hold on;
[xx,yy] = meshgrid (linspace (min(coord(:,1)),max(coord(:,1)),200));
zz = griddata (coord(:,1),coord(:,2),coord(:,3),xx,yy);
mesh(xx,yy,zz);
hidden('off');
I have blank spot with little covering on interpolation. As you can see the border plane starts with z=0, but not with minimum z.
What should I do to cover all border lines?
c3.bin (748.0 KB)
c4.bin (816 Bytes)