Specify lighting algorithm
lighting flat
lighting gouraud
lighting none
lighting(ax,...)
lighting
selects the algorithm used to calculate the effects of
light
objects on all surface
and patch
objects in the current axes. In
order for the lighting
command to have any effects, however, you
must create a lighting object by using the light
or lightangle
function.
lighting flat
produces
uniform lighting across each of the faces of the object. Select this
method to view faceted objects.
lighting gouraud
calculates
the vertex normals and interpolates linearly across the faces. Select
this method to view curved surfaces.
lighting none
turns off
lighting.
lighting(ax,...)
uses the axes specified by ax
instead of the current axes.
The surf
, mesh
, pcolor
, fill
, fill3
, surface
, and patch
functions create graphics objects that are affected by light
sources. The lighting
command sets the FaceLighting
and
EdgeLighting
properties of surfaces and patches appropriately for the graphics object.