Eliminating visible lines from surfnorm

조회 수: 4 (최근 30일)
aaron pung
aaron pung 2015년 2월 6일
댓글: Chad Greene 2015년 2월 8일
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