📄 exm0753_1.m
字号:
%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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -