Set color shading properties
Syntax
shading flat
shading faceted
shading interp
Description
The shading
function controls the color shading of Surface and Patch graphics objects.
shading flat
each mesh line segment and face has a constant color determined by the color value at the end point of the segment or the corner of the face that has the smallest index or indices.
shading faceted
flat shading with superimposed black mesh lines. This is the default shading mode.
shading interp
varies the color in each line segment and face by interpolating the colormap index or true color value across the line or face.
Examples
Compare a flat, faceted, and interpolated-shaded sphere:
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')
Algorithm
shading
sets the EdgeColor
and FaceColor
properties of all Surface and Patch graphics objects in the current Axes. shading
sets the appropriate values, depending on whether the Surface or Patch objects represent meshes or solid surfaces.
See Also
fill
, fill3
, hidden
, mesh
, patch
, pcolor
, surf
The EdgeColor
and FaceColor
properties for Surface and Patch graphics objects.
[ Previous | Help Desk | Next ]