?? 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 + -