exm0753_1.m
来自「这是本人收集的一些程序源代码」· M 代码 · 共 25 行
M
25 行
%exm0753_1.m
clf;shg;clear
[X,Y,Z]=sphere(40);
colormap(jet) %<3>
figure(1);surf(X,Y,Z);shading interp %<4>
light ('position',[2,-2,2],'style','local') %<5>
lighting phong %<6>
material([0.5,0.3,0.5,10,0.5]) %<7>
axis square off
figure(2);
hs=surf(X,Y,Z,-Z);shading flat %<8>
light;lighting flat %<9>
light('position',[-1,-1,-2],'color','y') %<10>
light('position',[-1,0.5,1],'style','local','color','w') %<11>
material([0.4,0.5,0.3,10,0.3]) %<12>
axis square off
disp('按任意键,可继续!')
pause
for k=1:10
rotate(hs,[0,0,1],15,[0,0,-1])
MM(:,k)=getframe;
end
movie(MM,20)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?