Graphics Reference
In-Depth Information
In the following example (Figure 4-10 ), we reduce the faces of the anterior surface by 15% and show both images
for comparison.
>> [x,y,z,v] = flow;
p = patch(isosurface(x,y,z,v,-3));
set(p,'facecolor','w','EdgeColor','b');
daspect([1,1,1])
view(3)
figure;
h = axes;
p2 = copyobj(p,h);
reducepatch(p2,0.15)
daspect([1,1,1])
view(3)
Figure 4-10.
The following example reduces the volume of the previous isosurface (Figure 4-11 ) and then shrinks the size of
their faces (Figure 4-12 ).
>> [x, y, z, v] = flow;
[x, y, z, v] = reducevolume(x,y,z,v,2);
FV = isosurface(x,y,z,v,-3);
p1 = patch(FV);
set(p1,'FaceColor','red','EdgeColor',[.5,.5,.5]);
daspect([1 1 1]); view(3); axis tight
title('Original')
>> figure
p2 = patch(shrinkfaces(FV,.3));
set(p2,'FaceColor','red','EdgeColor',[.5,.5,.5]);
daspect([1 1 1]); view (3); axis tight
title ('after the contraction of faces')
Search WWH ::




Custom Search