function ezsurfvs(f,a,b,g1,g2)
% ezsurfvs(f,a,b,g1,g2)
%
% plot graph of f over vertically simple region
%   a <= x <= b
%  g1 <= y <= g2
% where f is symbolic expression of x,y
% g1,g2 are symbolic expressions of x
% 
% Example: top part of sphere with radius 1
%   syms x y
%   f = sqrt(1-x^2-y^2)
%   g1 = -sqrt(1-x^2)
%   g2 = sqrt(1-x^2)
%   ezsurfvs(f,-1,1,g1,g2)
%   nice3d

a = double(a); b = double(b);
f = sym(f); 
g1 = sym(g1); g2 = sym(g2);

syms x y
syms XT YT
YY = (1-YT)*g1+YT*g2;
FT = subs(f,y,YY);
ezsurf(XT,subs(YY,x,XT),subs(FT,x,XT)+0*XT+0*YT,[a,b,0,1]);
p = findobj(gca,'type','surface'); p = p(1);
set(p,'MeshStyle','column','FaceColor','interp');

title('')


