Skip to content

Instantly share code, notes, and snippets.

@thinkhy
Created February 24, 2014 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thinkhy/9188745 to your computer and use it in GitHub Desktop.
Save thinkhy/9188745 to your computer and use it in GitHub Desktop.
Earth's rotation from dayside and nightside
figure
load('topo.mat','topo','topomap1');
[x,y,z] = sphere(50);
cla reset
axis square off
props.AmbientStrength = 0.1;
props.DiffuseStrength = 1;
props.SpecularColorReflectance = .5;
props.SpecularExponent = 20;
props.SpecularStrength = 1;
props.FaceColor= 'texture';
props.EdgeColor = 'none';
props.FaceLighting = 'phong';
props.Cdata = topo;
h=surface(x,y,z,props);
h1=light('position',[-1 0 0],'Style','infinite');
% light('position',[-1.5 0.5 -0.5], 'color', [.6 .2 .2]);
set(gcf,'color',[1 1 1]);
el=0;
for az=0:10:300
view(az, el)
drawnow;
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment