How to cut off 1/4 of half sphere

10 visualizzazioni (ultimi 30 giorni)
Hello! I'm a rookie in Matlab worId... I want to make an illustration of 3/8 of a sphere (this is, just 3/4 of the upper half) but I would like to do it without changing the current axis limits. Anyone can help, please? Thanks a lot! Have a nice day! (:
Target:
Current:
Current code:
[x y z]=sphere;
r=378;
surf(r*x,r*y,r*z+81.250);
xlabel('x axis [mm]')
ylabel('y axis [mm]')
zlabel('z axis [mm]')

Risposta accettata

Cris LaPierre
Cris LaPierre il 8 Mag 2021
Set the corresponding quadrant values equal to nan. There are several ways to do this. Here is one.
[x y z]=sphere;
x(11:end,1:5)=nan;
r=378;
surf(r*x,r*y,r*z+81.250);

Più risposte (0)

Categorie

Scopri di più su Lighting, Transparency, and Shading in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by