[X0,Y0,Z0]=sphere(30);
X=2*X0;Y=2*Y0;Z=2*Z0;
surf(X0,Y0,Z0);
shading interp
hold on,mesh(X,Y,Z),colormap(hot),hold off
hidden off
axis equal,axis off
利用“非数”NaN,对图形进行镂空处理。
P=peaks(30);P(18:20,9:15)=NaN;
surfc(P);colormap(summer)
light(‘position‘,[50,-10,5]),lighting flat
material([0.9,0.9,0.6,15,0.4])
原文:https://www.cnblogs.com/rongyupan/p/12662515.html