3-D Visualization Previous page   Next Page

Selecting a Lighting Method

When you add lights to an axes, MATLAB determines the effects these lights have on the patch and surface objects that are displayed in that axes. There are different methods used to calculate the face and edge coloring of lit objects, and the one you select depends on the results you want to obtain.

Face and Edge Lighting Methods

MATLAB supports three different algorithms for lighting calculations, selected by setting the FaceLighting and EdgeLighting properties of each patch and surface object in the scene. Each algorithm produces somewhat different results:

This illustration shows how a red sphere looks using each of the lighting methods with one white light source.

The lighting command (as opposed to the light function) provides a convenient way to set the lighting method.


Previous page  Properties That Affect Lighting Reflectance Characteristics of Graphics Objects Next page

© 1994-2005 The MathWorks, Inc.