Eliminating visible lines from surfnorm

4 vues (au cours des 30 derniers jours)
aaron pung
aaron pung le 6 Fév 2015
Commenté : Chad Greene le 8 Fév 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!

Réponses (1)

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

Connectez-vous pour commenter.

Catégories

En savoir plus sur Lighting, Transparency, and Shading dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by