MATLAB Functions Help Desk

shading

Purpose

Set color shading properties

Syntax

Description

The shading function controls the color shading of Surface and Patch graphics objects.

shading flat sets each mesh line segment, Surface face, or Patch face to a constant color determined by the color values at the end points of the segment, or the corners of the Surface face or Patch.

shading faceted sets the shading to flat with individual faces outlined in black. This is the default shading mode.

shading interp varies the color in each line segment, Surface face, or Patch face by interpolating the colormap index or true color value across the face or line.

Examples

Compare a flat-shaded sphere with a Gouraud-shaded sphere:



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

The EdgeColor and FaceColor properties for Surface and Patch graphics objects.



[ Previous | Help Desk | Next ]