shili27.m

来自「matlab 6.0 时尚百例的21-30的代码」· M 代码 · 共 50 行

M
50
字号
function shili27
subplot(221);
sphere
shading flat
%去掉网格线
camlight left
%根据相机的位置移动光源
camlight right
lighting flat
%建立光源对象,均衡图形中每个小表面的交叉颜色
colorbar
%添加颜色条
axis off
%去掉坐标轴
title('F1')

subplot(222)
sphere
shading flat
camlight left
camlight right
lighting gouraud
%对小表面的交叉颜色做颜色插值
colorbar
axis off
axis off
title('F2')

subplot(223)
sphere
shading interp
camlight right
camlight left
lighting phong
%对小表面的交叉颜色做颜色插值,并计算每个像素的反射比
colorbar
axis off
title('F3')

subplot(224)
sphere
shading flat
camlight left
camlight right
lighting none
%关闭照明
colorbar
axis off
title('F4')

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?