function CARPETisosurface(d,isoval,transp) % % function CARPETisosurface(d,isoval,transp) % % plot an isosurface of d at the value isoval % using all the ref. level and components. % The parameter transp goes from 0 to 1 and % determines the transparency of the surfaces. % % EXAMPLE: % str = CARPETListDatasetHDF5('data/hdf5','phi',1); % d = CARPETLoadDatasetHDF5(str,2); % CARPETisosurface(d,-0.05,0.2) % % Author: Gian Mario Manca, manca@fis.unipr.it % http://www.fis.unipr.it/~manca % % These scripts are distributed under the GNU General Public License (GPL) % 11 October 2006 for a=d.rlmin:d.rl for b=1:d.c(a) %a=1; b=1; n=d.num2name(a,b); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % HERE GRAPHICAL COMMANDS LOOK AT THE MATLAB HELP FOR INFO %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% isosurface(d.dt(n).Xr,d.dt(n).Yr,d.dt(n).Zr,double(d.dt(n).val),isoval); shading flat; hold on %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% end end alpha(transp) axis equal; %axis square; hold off xlabel(['Val=' num2str(isoval) ' at ' num2str(d.timeMSEC) 'ms']); title([d.names(d.num2name(d.rlmin,1))]); end