# MATLAB代做|FPGA代做|python代做-基于matlab月亮绕地球的动画源码程序

### 时间：2020-10-21 21:14:51 点击：

核心提示：MATLAB代做|FPGA代做|python代做-基于matlab月亮绕地球的动画源码程序...
function nightonearth
% NIGHTONEARTH shows rotating earth by night
% Requires images 'earth_lights_small.jpg' and
% 'moon.jpg' on the path

stars=rand(100,2);
[x,y,z] = sphere(48);
x2=(x*0.2734)+2;
y2=y*0.2734;
z2=z*0.2734;
f=figure('Color','k');
staraxis=axes('units','normalized','position',[0,0,1,1]);
scatter(stars(:,1),stars(:,2),'w.');
axis off
earthaxis=axes('units','normalized','position',[0,0,1,1]);
hold on;
s=surf(x,y,z);
s2=surf(x2,y2,z2);
% [X,Y]=meshgrid(0:2*pi/60:2*pi,(logspace(0,1,20)-1)./10);
% [X,Y]=pol2cart(X,Y);
% Z=X.^2+Y.^2;
% s3=surf(X,Y,Z);

axis([-2.5,2.5,-2.5,2.5,-1.5,1.5]);
daspect([1,1,1])
axis off vis3d
set(gca,'Position',[0,0,1,1]);

topoud=flipdim(topo,1);

set(s,'facecolor','texture');
set(s,'cdata', im2double(topoud));

set(s2,'facecolor','texture');
set(s2,'cdata', im2double(topomoon));

camtarget([0,0,0]);
campos([25,0,0]);
u=uicontrol('style', 'togglebutton', 'value', false, 'string', 'Exit');
while ~get(u, 'value')
rotate(s,[0,0,1],1,[0,0,0]);
rotate(s2,[0,0,1],0.0357,[0,0,0]);
%     camorbit(15,0)
pause(0.1)
end
close(f)

QQ ：1224848052

• 百度搜索
• 查阅资料过程中
• 论坛发现
• 百度贴吧发现
• 朋友介绍
• 没有相关文章
• 大名：
• 内容：