⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 earth.m

📁 模拟地球转动的程序 matlab 代码 程序 直接可用
💻 M
字号:
function earth
D=figure('color','k','MenuBar','none','NumberTitle','off','Resize','off',...
    'WindowStyle','modal',...
    'units','norm','position',[0.3013    0.2067    0.3975    0.6633]);
load('topoh.mat','topo','topomap1');
colormap(topomap1);
[x,y,z] = sphere(60);
axis equal off
view(3)
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';
while ishandle(D)
props.Cdata = topo;
try
delete(findobj(D,'type','surface'));
delete(findobj(D,'type','light'));
end
surface(x,y,z,props);
light('position',[-1 0 .5]);
light('position',[-1.5  0.5  -0.5], 'color', [.6 .2 .2]);
topo=changetopo(topo);
pause(.1)
end

function c=changetopo(topo)
[m,n]=size(topo);
c(:,2:n)=topo(:,1:n-1);
c(:,1)=topo(:,n);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -