函数说明:
是阴影函数控制曲面和图形对象的颜色着色,即用来处理色彩效果的,包括以下三种形式:
shading faceted:默认模式,在曲面或图形对象上叠加黑色的网格线;
shading flat:是在shading faceted的基础上去掉图上的网格线;
shading interp:对曲面或图形对象的颜色着色进行色彩的插值处理,使色彩平滑过渡 ;
实例:该实例来源matlab帮助,可直接运行
<span style="font-size:14px;">subplot(3,1,1)
sphere(16) %绘制球体
axis square
shading flat
title('Flat Shading')
subplot(3,1,2)
sphere(16)
axis square
shading faceted
title('Faceted Shading')
subplot(3,1,3)
sphere(16)
axis square
shading interp
title('Interpolated Shading')</span>
运行结果: