?? exm110633_1.m
字號:
function exm110633_1
shg;R0=1;
a=12*R0;b=9*R0;T0=2*pi;
T=5*T0;dt=pi/100;t=[0:dt:T]';
f=sqrt(a^2-b^2);
th=12.5*pi/180;
E=exp(-t/20);
x=E.*(a*cos(t)-f);y=E.*(b*cos(th)*sin(t));z=E.*(b*sin(th)*sin(t));
plot3(x,y,z,'g')
[X,Y,Z]=sphere(30);X=R0*X;Y=R0*Y;Z=R0*Z;
grid on,hold on,surf(X,Y,Z),shading interp
x1=-18*R0;x2=6*R0;y1=-12*R0;y2=12*R0;z1=-6*R0;z2=6*R0;
axis([x1 x2 y1 y2 z1 z2])
view([117 37]),
p=input('Please input the comet'' length coeffient (the default value is 0.1): ');
if ~isempty(p),
p=0.1;
end
comet3(x,y,z,p),hold off
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -