View 2D Plane of 3D Graph

7 ビュー (過去 30 日間)
Michael Boyte
Michael Boyte 2023 年 2 月 28 日
回答済み: Cameron 2023 年 2 月 28 日
I have plotted several spheres and I would like to see only the circles created by those spheres at a given height along the z-axis. I have tried to udnerstand the slice fucntion, but I've been unsuccessful and I'm not certain its even the function I need to use. In short, I want to see the intersection of the spheres with the x-y plane at a given z-value. How can I do this?


Cameron 2023 年 2 月 28 日
If you are unable to get slice to work, you can do something like this.
[X2,Y2,Z2] = sphere(100);
X = X2 + 0.5;
Y = Y2 + 0.2;
Z = Z2*0.5 + 0.1;
hold on
hold off
p = gca;
p.View = [0,90];
Zslice = 0.2;
p.ZLim = [Zslice-0.005,Zslice+0.005];

その他の回答 (0 件)


Help Center および File ExchangeLighting, Transparency, and Shading についてさらに検索





Community Treasure Hunt

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

Start Hunting!

Translated by