フィルターのクリア

Drawing a sphere inside a sphere?

3 ビュー (過去 30 日間)
Mark
Mark 2012 年 7 月 25 日
コメント済み: Star Strider 2021 年 5 月 16 日
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 日
You can add
alpha(0.5)
after you plot the first one.
  3 件のコメント
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 日
Another possible solution is to simply add
hidden off
to the very end of your code.
  1 件のコメント
Mark
Mark 2012 年 7 月 26 日
Works, thank you!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by