R=1; %球半径
n=30; %网格大小=[n/2+2,n+1];
theta = (-n:2:n)/n*pi;
phi = ([0,0:2:n])'/n*pi/2;
cosphi = cos(phi); cosphi(1) = 0; cosphi(end) = 0;
sintheta = sin(theta); sintheta(1) = 0; sintheta(end) = 0;
x = R*cosphi*cos(theta);
y = R*cosphi*sintheta;
z = R*sin(phi)*ones(1,n+1);
surf(x,y,z);
axis equal
追问这个有底面吗?
还是只是一个曲面
大神求教