필터 지우기
필터 지우기

Lighting only certain surfaces

조회 수: 1 (최근 30일)
Theo
Theo 2011년 10월 12일
I'd like to create a lit sphere, to be placed on an unlit surface. For example,
membrane;
[x,y,z] = sphere(40);
hold on;
surf(0.1*x,0.1*y,0.1*z+1);
light % lights everything!
The last command lights everything, but I just want to light the sphere. How would I do that?

채택된 답변

Sean de Wolski
Sean de Wolski 2011년 10월 12일
Manually set the facelighting property of each object:
Z = membrane;
H(1) = surf(Z);
[x,y,z] = sphere(40);
hold on;
H(2) = surf(0.1*x,0.1*y,0.1*z+1);
set(H(1),'facelighting','none');
set(H(2),'facelighting','phong');
light % lights everything!
  댓글 수: 1
Theo
Theo 2011년 10월 12일
Brilliant! Thanks

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by