Is it possible to draw a sphere inside a sphere? I tried the following, but this covers the small sphere, despite the "mesh" instead of "surf":
[x,y,z] = sphere();
r = 5;
mesh( r*x, r*y, r*z );
hold on
r = 2;
mesh( r*x, r*y, r*z );
hold off

 채택된 답변

Honglei Chen
Honglei Chen 2012년 7월 25일

2 개 추천

You can add
alpha(0.5)
after you plot the first one.

댓글 수: 3

Mark
Mark 2012년 7월 26일
Excellent thank you
Juan Gomez
Juan Gomez 2021년 5월 16일
Sorry, i'm new to Matlab. I have a question. What is "alpha" for?
Star Strider
Star Strider 2021년 5월 16일
It’s the patch transparency parameter, now called FaceAlpha.

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

추가 답변 (1개)

Matt
Matt 2012년 7월 25일

1 개 추천

Another possible solution is to simply add
hidden off
to the very end of your code.

카테고리

태그

질문:

2012년 7월 25일

댓글:

2021년 5월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by