Documentation

我们为许可用户提供了部分翻译好的中文文档。您只需登录便可查阅这些文档

lighting

Specify lighting algorithm

Syntax

lighting flat
lighting gouraud
lighting none

Description

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 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.

More About

collapse all

Tips

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.

Introduced before R2006a

Was this topic helpful?