exm065_3.m
来自「北京航空航天大学出版社张志涌、徐彦琴主编的matlab教程附带的mfile例程压」· M 代码 · 共 23 行
M
23 行
%exm065_3.m
clear
clf;
[X,Y,Z]=sphere(40);
colormap(jet) %<3>
surf(X,Y,Z);shading interp %<4>
light ('position',[0 -10 1.5],'style','infinite') %<5>
lighting phong %<6>
material shiny %<7>
axis equal off
shg
disp(' 以上图形采用插值着色。')
disp(' 按任意键继续!下面采用小块表面分别着色。')
pause
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>
axis equal off
shg
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?