资源简介
matlab日地月公转的三维动画,matlab日地月公转的三维动画
代码片段和文件信息
clear;clc;
R=10;
Rr=4;
thita0=pi/180*5;
[xyz]=sphere(10);
axis([-15 15 -15 15 -5 5]‘equal‘‘manual‘);hold on;grid on;
surf(3*x3*y3*z);%axis off
xlabel(‘x‘)
ylabel(‘y‘)
zlabel(‘z‘)
h1=surf(xyz);
h2=surf(xyz);
thita1=pi/180*30/360;thita2=pi/180*30;
stop = uicontrol(‘style‘‘toggle‘‘units‘‘norm‘‘pos‘[.91 .94 .08 .05] ...
‘backgr‘‘w‘‘fontw‘‘bold‘‘string‘‘stop‘);
k=0;
while get(stop‘value‘) == 0
x1=2*x+R*cos(k*thita1);y1=2*y+R*sin(k*thita1);z1=2*z+0;
x2=x+R*cos(k*thita1)+Rr*sin(k*th
评论
共有 条评论