|MATLAB Function Reference|
Create a light object
light creates a light object in the current axes. Lights affect only patch and surface objects.
light(' creates a light object using the specified values for the named properties. MATLAB parents the light to the current axes unless you specify another axes with the
handle = light(...) returns the handle of the light object created.
You cannot see a light object per se, but you can see the effects of the light source on patch and surface objects. You can also specify an axes-wide ambient light color that illuminates these objects. However, ambient light is visible only when at least one light object is present and visible in the axes.
You can specify properties as property name/property value pairs, structure arrays, and cell arrays (see
get for examples of how to specify these data types).
See also the patch and surface
VertexNormals properties. Also see the
peaks surface plot with a light source located at infinity and oriented along the direction defined by the vector
[1 0 0], that is, along the x-axis.
Setting Default Properties
You can set default light properties on the axes, figure, and root levels:
Property is the name of the light property and
PropertyValue is the value you are specifying. Use
get to access light properties.
Lighting as a Visualization Tool for more information about lighting
Lighting for related functions
Light Properties for property descriptions
© 1994-2005 The MathWorks, Inc.