| Products & Services | Industries | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
lighting flat
lighting gouraud
lighting phong
lighting none
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.
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.
fill, fill3, light, material, mesh, patch, pcolor, shading, surface
Lighting as a Visualization Tool for more information about lighting
Lighting for related functions
![]() | lightangle | lin2mu | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |