?? meshcolor.m
字號:
clear
clc
[X0,Y0,Z0]=sphere(30); %產生單位球面的三維坐標
X=2*X0;Y=2*Y0;Z=2*Z0; %產生半徑為2的球面的三維坐標
clf
subplot(1,2,1);
surf(X0,Y0,Z0); %畫單位球面
shading interp %采用插補明暗處理
hold on,mesh(X,Y,Z),colormap(hot),hold off %采用hot色圖
hidden off %產生透視效果
axis equal,axis off %不顯示坐標軸
title('透視圖')
subplot(1,2,2);
surf(X0,Y0,Z0); %畫單位球面
shading interp %采用插補明暗處理
hold on,mesh(X,Y,Z),colormap(hot),hold off %采用hot色圖
hidden on %產生消隱效果
axis equal,axis off %不顯示坐標軸
title('消隱圖')
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -