
N = 4;
%xi locations 
xi1 = 0:0.1:1;
xi2 = 0:0.01:1;

% grid of xi1 and xi2 points
[mxi1,mxi2]=meshgrid(xi1,xi2);
[nxi1,nxi2]=size(mxi1);


% top surface
for i=1:nxi1,
   for j=1:nxi2,
         Psi1 = CH(mxi1(i,j));
         Psi2 = ClosCircBasis(mxi2(i,j),N);
         PSI(i,j) = Psi1(1,2)*Psi2(1,2);
   end;
end;

surf(mxi1,mxi2,PSI);
axis equal;
xlabel('\xi_1');
ylabel('\xi_2');
zlabel('PSI');
