Eliminating visible lines from surfnorm

4 次查看(过去 30 天)
I'm using the 'surfnorm' function in my script. Is there a way that I can have the function run without having the red lines visible? I'm thinking it might be a property I can state, but everythign I've tried just changes the surface features, not the normal vector features.
On a related note, it does *not* work if I simply do something like [A,B,C] = surfnorm(X,Y,Z). My script only runs if I have "surfnorm(X,Y,Z)". Thanks in advance!

回答(1 个)

Chad Greene
Chad Greene 2015-2-7
Does this work?
surfnorm(X,Y,Z,'linestyle','none')
  2 个评论
aaron pung
aaron pung 2015-2-7
No, it doesn't. Oddly, that statement only acts on the sphere (that is, the grid on the sphere's surface disappears). The red lines are still there. Specifically, code like:
R=10;
Phi=linspace(-pi/3,pi/3,10);
Theta=linspace(0,pi);
[Phi,Theta] = meshgrid(Phi,Theta);
% [X,Y,Z]=sph2cart(Theta,Phi,R);
Z=R*sin(Phi);
X=R*cos(Phi).*cos(Theta);
Y=R*cos(Phi).*sin(Theta);
surf(X,Y,Z); axis equal tight;
surfnorm(X',Y',Z')
gives a sphere with outward pointing normal vectors (red lines). I'd like to still perform the surfnorm function, but I'd like the red lines to not be visible. To recap,
surfnorm(X',Y',Z','linestyle','none')
does not work. Thank you, though!
Chad Greene
Chad Greene 2015-2-8
How strange! I have not used surfnorm before, and I don't know what the problem could be. Hopefully someone else can help!

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by