matlab 眼镜蛇机动壁纸制作

TR=stlread('f-16.stl');
T=TR.ConnectivityList;
X=TR.Points(:,1);
Y=TR.Points(:,2);
Z=TR.Points(:,3);
i=1;
for beta=0:-30:-120
beta=beta/57.3;
if i==2
    beta=beta-15/57.3;
end
alpha=0/57.3;
gamma=0/57.3;
Cx=cos(gamma);Sx=sin(gamma);% X轴 滚转
Cy=cos(beta);Sy=sin(beta);  % Y轴 俯仰
Cz=cos(alpha);Sz=sin(alpha);% Z轴 偏航
R=[Cy*Cz             Cy*Sz         -Sy
   Sx*Sy*Cz-Cx*Sz  Sx*Sy*Sz+Cx*Cz  Sx*Cy
   Cx*Sy*Cz+Sx*Sz  Cx*Sy*Sz-Sx*Cz  Cx*Cy];
NP=R*[X';Y';Z'];
x=NP(1,:)'+25*(i-1);
y=NP(2,:)';
z=NP(3,:)';
if i==1
    z=z-12;
end
TR = triangulation(T,x,y,z);
 h=trisurf(TR);
 axis equal;
  box;
  hold on
  i=i+1;
end

上一篇:SQL SERVER中UPDLOCK ,READPAST使用


下一篇:Python编程:从python中理解面向对象