www.pudn.com > matlab8.zip > earth_zzy.m


function earth_zzy(ap) 
%erath_zyy.m   绘制三维地球 
% ap					取0时,相机视角采用自动设置; 
%							取1时,相机视角取缺省值的十分之一,因此地球显得较大。 
load topo				%装载图象topo 和相应的图象色图 topomap1  
figure('colormap',topomap1,'Color',[.8 .8 .8]);	%设置图形窗的色图和背景色<6> 
[x,y,z] = sphere(50); 
azzy.DataAspectRatio = [1 1 1];azzy.PlotBoxAspectRatioMode = 'auto'; 
fa = axes('Visible','off', azzy);			%设置轴的数据宽高比和坐标框三度比 
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);%设置面对象			<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])