Eliminating visible lines from surfnorm

4 views (last 30 days)
aaron pung
aaron pung on 6 Feb 2015
Commented: Chad Greene on 8 Feb 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!

Answers (1)

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

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!