function trisurfcorcen_test()

%TRISURFCORCEN_TEST  test for TRISURFCORCEN
%
%See also: trisurfcorcen

   MTestCategory.Integration;

   el = 30;
   nx = 3;
   ny = 2;
   zlims  = [-.4 .4];
   aspect = [1 1 .2];
   
   dx        = 0.5;
   dy        = 0.5;
   [x,y]     = meshgrid(-2:dx:2, -2:dy:2);
   z         = x .* exp(-x.^2 - y.^2);
   
   tri.p     = delaunay(x,y);
   [tri.x,tri.y,tri.z] = tri_corner2center(tri.p,x,y,z);%tri.z    = mean(z(tri.p),2);
   
   %                       zzzzz ccccc
   subplot(ny,nx,1)
   trisurfcorcen(tri.p,x,y,    z,    z);
   view   (-20,el)
   zlim   (zlims)
   daspect(aspect)
   title('trisurfcorcen(cor.z,cor.c)')
   zlabel({'\downarrow c at corners (vertices)','shading interp look'})
   
   subplot(ny,nx,2)
   trisurfcorcen(tri.p,x,y,tri.z,    z);
   view   (-20,el);grid on
   zlim   (zlims)
   daspect(aspect)
   title('trisurfcorcen(cen.z,cor.c)')
   
   subplot(ny,nx,3)
   trisurfcorcen(tri.p,x,y,z);
   view   (-20,el);grid on
   zlim   (zlims)
   daspect(aspect)
   title('trisurfcorcen(cor.c)')
   
   subplot(ny,nx,4)
   trisurfcorcen(tri.p,x,y,    z,tri.z);
   view   (-20,el);grid on
   zlim   (zlims)
   daspect(aspect)
   title('trisurfcorcen(cor.z,cen.c)')
   zlabel({'\downarrow c at centers (faces)','shading flat look'})
   xlabel( '\uparrow    z at corners (vertices)')
   
   subplot(ny,nx,5)
   trisurfcorcen(tri.p,x,y,tri.z,tri.z);
   view   (-20,el);grid on
   zlim   (zlims)
   daspect(aspect)
   title ('trisurfcorcen(cen.z,cen.c)')
   xlabel('\uparrow    z at centers (faces)')
   
   subplot(ny,nx,6)
   trisurfcorcen(tri.p,x,y,tri.z);
   view   (-20,el);grid on
   zlim   (zlims)
   daspect(aspect)
   title({'trisurfcorcen(cen.c)'})
   xlabel('\uparrow    z derived from c')
   
   print2screensizeoverwrite(mfilename)   
   
%% EOF   