function p = spline_surface(c,tau1,tau2,t1,t2) 
% SPLINE_SURFACE: evaluation of a spline surface
% p = spline_surface(c,tau1,tau2,t1,t2) 
% points p(j1,j2) on a spline surface with control points c(k1,k2,:)
% and knots tau1 and tau2 for parameters (t1(j1),t2(j2)) 
dim = size(c,3);
for i=1:dim 
   ci = c(:,:,i);
   % first parameter direction
   ci = spline_curve(ci,tau1(:),t1(:));
   % second parameter direction
   p(:,:,i) = spline_curve(ci',tau2(:),t2(:))';
end

