|
|
#9
chinasoul2008-03-14 21:17
回复 6# 的帖子
For example, these statements slice the volume in the first example with a rotated plane. Placing these commands within a for loop "passes" the plane through the volume along the z-axis.
for i = -2:.5:2
hsp = surf(linspace(-2,2,20),linspace(-2,2,20),zeros(20)+i);
rotate(hsp,[1,-1,1],30)
xd = get(hsp,'XData');
yd = get(hsp,'YData');
zd = get(hsp,'ZData');
delete(hsp)
slice(x,y,z,v,[-2,2],2,-2) % Draw some volume boundaries
hold on
slice(x,y,z,v,xd,yd,zd)
hold off
axis tight
view(-5,10)
drawnow
end
|