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