shading

Purpose

Set color shading properties.

Synopsis

shading flat
shading faceted
shading interp

Description

shading controls the color shading of surface and patch objects. surface and patch objects are created by the functions surf, mesh, pcolor, fill, and fill3.

shading flat sets the shading of the current graph to flat. Flat shading is piecewise constant; each mesh line segment or surface patch has a constant color determined by the color values at the end points of the segment or the corners of the patch.

shading interp sets the shading to interpolated. Interpolated shading, which is also known as Gouraud shading, is piecewise bilinear; the color in each segment or patch varies linearly and interpolates the end or corner values.

shading faceted sets the shading to faceted, which is the default. Faceted shading is flat shading with superimposed black mesh lines. This is often the most effective.

Algorithm

shading sets the EdgeColor and FaceColor properties of all surface objects in the current axes. It sets them to the correct values, depending on whether the surface objects represent meshes or surfaces.

See Also

fill, fill3, hidden, mesh, patch, pcolor, surf, surface
surface object properties EdgeColor and FaceColor 

(c) Copyright 1994 by The MathWorks, Inc.