% Illustration of some 3-dimensional topographic figure
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright (C) 2017 Feng Jinming, IAP, CAS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

figure
load topo
ctopo=topo(90:160,50:160);
clegend=[1 70 50];
worldmap(topo,topolegend);
meshm(topo,topolegend);
demcmap(topo)
axis off
setm(gca,'Origin',[0 105 0])

ptopo = topo; ptopo(topo<0) = 0;
ptopo = 100*ptopo/(6371*1000);
figure
axesm('MapProjection','ortho','Origin',[0 0 15])
meshm(topo,topolegend,size(topo),topo/10000); 
shading interp
demcmap(topo)
lightm(23.5,80,'Color',[1 1 0.2])
material([.6 0.8 0]);
lighting phong
axis off
daspectm('km',20000)

figure
axesm('MapProjection','globe','Origin',[0 105 0])
meshm(topo,topolegend,size(topo),topo/100000); 
shading interp
% [lat,lon]=meshgrat(topo,topolegend);
% surfm(lat,lon,topo,ptopo)
demcmap(topo)
lightm(23.5,20,'Color','y')
material([.6 1 0]);
lighting phong
axis off
view([200 0])

z=topo;
figure
surf(z)
shading interp
demcmap(z)
view([0 90])
axis off
light('position',[1 180 1000],'color','w')
material([0.6 1 0]);
lighting phong
