我不确定我是否理解问题的第二部分,但这是使用等值面可视化 3D 体积的方式(我使用的是流体流动示例数据)
%# get a sample data with 0 for empty, 1 for solid
[~,~,~,v] = flow;
v = double( v<-3 );
%# visualize the volume
p = patch( isosurface(v,0) ); %# create isosurface patch
isonormals(v, p) %# compute and set normals
set(p, 'FaceColor','r', 'EdgeColor','none') %# set surface props
daspect([1 1 1]) %# axes aspect ratio
view(3), axis vis3d tight, box on, grid on %# set axes props
camproj perspective %# use perspective projection
camlight, lighting phong, alpha(.5) %# enable light, set transparency

要了解有关 MATLAB 中的体积可视化的更多信息,请参阅Doug 博客上发布的这个出色的视频教程系列