![789.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/246821/789.png)
how to plot a cute sphere
4 ビュー (過去 30 日間)
古いコメントを表示
hi. i tried to plot a sphere with sphere function. but the sphere was very ugly. and it was more like an ovoid. plz help me to plot a nice sphere. something like this pic
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/246818/image.jpeg)
a=[0 0 0];
[e,f,g] = sphere(30);
e=e*0.3;
f=f*0.3;
g=g*0.3;
s1=surf(e+a(1),f+a(2),g+a(3),'FaceAlpha',0.2,'FaceColor','r')
1 件のコメント
KALYAN ACHARJYA
2019 年 11 月 5 日
I am achieved upto this level, see here
[x,y,z]=sphere;
hSurface=surf(x,y,z);
set(hSurface,'FaceColor',[0 0 0],'FaceAlpha',0.3,'FaceLighting','gouraud','EdgeColor','none')
camlight
axis equal
axis off
![789.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/246821/789.png)
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!