Documentation Center

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

lighting

Specify lighting algorithm

Syntax

lighting flat
lighting gouraud
lighting phong
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 phong interpolates the vertex normals across each face and calculates the reflectance at each pixel. Select this choice to view curved surfaces. Phong lighting generally produces better results than Gouraud lighting, but it takes longer to render.

lighting none turns off lighting.

More About

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

See Also

| | | | | | | |

Was this topic helpful?