3-D Visualization |
Light Objects
You create a light object using the light
function. Three important light object properties are
Color
-- Color of the light cast by the light object
Style
-- Either infinitely far away (the default) or local
Position
-- Direction (for infinite light sources) or the location (for local light sources)
The Color
property determines the color of the directional light from the light source. The color of an object in a scene is determined by the color of the object and the light source.
The Style
property determines whether the light source is a point source (Style
set to local
), which radiates from the specified position in all directions, or a light source placed at infinity (Style
set to infinite
), which shines from the direction of the specified position with parallel rays.
The Position
property specifies the location of the light source in axes data units. In the case of a light source at infinity, Position
specifies the direction to the light source.
Lights affect surface and patch objects that are in the same axes as the light. These objects have a number of properties that alter the way they look when illuminated by lights.
Lighting Commands | Adding Lights to a Scene |
© 1994-2005 The MathWorks, Inc.