Eliminating visible lines from surfnorm

2 visualizaciones (últimos 30 días)
aaron pung
aaron pung el 6 de Feb. de 2015
Comentada: Chad Greene el 8 de Feb. de 2015
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!

Respuestas (1)

Chad Greene
Chad Greene el 7 de Feb. de 2015
Does this work?
surfnorm(X,Y,Z,'linestyle','none')
  2 comentarios
aaron pung
aaron pung el 7 de Feb. de 2015
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 el 8 de Feb. de 2015
How strange! I have not used surfnorm before, and I don't know what the problem could be. Hopefully someone else can help!

Iniciar sesión para comentar.

Categorías

Más información sobre Lighting, Transparency, and Shading en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by