www.pudn.com > B-Interpolation.rar > testSurfInter.m, change:2016-11-02,size:632b


%Test the surface interpolation routine 
 
Dx=[0 1 2 3 4 5 6 7;0 1 2 3 4 5 6 7;0 1 2 3 4 5 6 7;0 1 2 3 4 5 6 7]; % data points 
Dy=[0 0 0 0 0 0 0 0;1 1 1 1 1 1 1 1;2 2 2 2 2 2 2 2;3 3 3 3 3 3 3 3]; 
Dz=[1 1 2 2 3 3 4 4;2 2 3 3 4 4 3 3;3 3 3 4 5 2 2 1;2 2 2 3 1 0 0 0]; 
ku=4; 
kv=3; 
nu=8; 
nv=4; 
D=[0 0; 3 4; -1 4; -4 0; -4 -3]; % data points 
k=4; 
n=5; 
[P] = BsplineInterpolate(D,k,n); 
plot(P) 
% [Px,Py,Pz,U,V] = BsplineSurfInter(Dx,Dy,Dz,ku,kv,nu,nv); 
 
% CP = cat(3,Px',Py',Pz'); 
% CP = shiftdim(CP,2); 
%  
% num = 80; 
%  
% plotNUBSsurface(ku-1,kv-1,U,V,CP,num); 
%  
% plot3(Dx,Dy,Dz,'.','MarkerSize',15); 
% hold off