?? earth_zzy.m
字號:
function earth_zzy(ap)
%erath_zyy.m 繪制三維地球
% ap 取0時,相機視角采用自動設(shè)置;
% 取1時,相機視角取缺省值的十分之一,因此地球顯得較大。
load topo %裝載圖象topo 和相應(yīng)的圖象色圖 topomap1
figure('colormap',topomap1,'Color',[.8 .8 .8]); %設(shè)置圖形窗的色圖和背景色<6>
[x,y,z] = sphere(50);
azzy.DataAspectRatio = [1 1 1];azzy.PlotBoxAspectRatioMode = 'auto';
fa = axes('Visible','off', azzy); %設(shè)置軸的數(shù)據(jù)寬高比和坐標(biāo)框三度比
szzy1.AmbientStrength = 0.1;szzy1.DiffuseStrength = 1;
szzy1.SpecularColorReflectance = .5; szzy1.SpecularExponent = 20;
szzy1.SpecularStrength = 1;
surface(x,y,z,szzy1,'FaceLighting','phong','FaceColor','texture',...
'EdgeColor','none','Cdata',topo,'Parent',fa);%設(shè)置面對象 <13>
if ap==1,set(fa,'CameraViewAngle',0.1*get(fa,'CameraViewAngle'));end
light('position',[-1 0 1],'color',[0.5 1 0.5]);
light('position',[-1.5 0.5 -0.5],'color',[.6 .2 .2]);
light('Position',[1.5 1.5 -1]);
light('Position',[0 -1.5 0],'color',[0.6 0.6 1]);
view([-17 26])
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -