function PlotIsosurf(x,y,z,u,value,VIEW)
% PlotIsosurf(x,y,z,u,v,view)
%
%  plot level surface where function is equal to value
%
%  x,y,z:    vectors specifying grid for x,y,z values
%  u    :    3 dimensional array of function values at 3D grid specified by x,y,z
%            
%  use meshgrid to compute U:
%  [X,Y,Z] = meshgrid(x,y,z);  u =  expression in X,Y,Z using .* ./ .^
%
% if VIEW is provided, it uses view(VIEW); 
% if not it will use the standard view in 3D

newplot

h = patch(isosurface(x,y,z,u,value),...
	'FaceColor',[.8 0 0],...
	'EdgeColor','none',...
	'AmbientStrength',.2,...
	'SpecularStrength',1,...
    'SpecularExponent',8,...
    'SpecularColorReflectance',0.5,...
	'DiffuseStrength',.5);
ILisonormals(x,y,z,u,h)

patch(isocaps(x,y,z,u,value),...
	'FaceColor','interp',...
	'EdgeColor','none')

colormap jet

daspect([1 1 1]);
if nargin < 6
    view(3);
else
    view(VIEW);
end;

set(gcf,'Renderer','zbuffer');

lighting gouraud;axis tight;axis off;camlight; 
