O'Reilly logo

MATLAB Graphics and Data Visualization Cookbook by Swapnonil Banerjee, Nivedita Majumdar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lighting

Lighting is a technique used for adding realism to a graphical scene. This is done by simulating the highlights and dark areas that occur on objects under natural lighting. The default light source is the ambient light, which is a directionless light that shines uniformly on all objects in the scene. You cannot see the light sources themselves. Objects created by functions such as surf, mesh, pcolor, fill, and fill3 as well as the surface and patch functions can show the effect of light and have several properties which govern how they will be impacted by the light sources.

Getting ready

In this recipe, you will use teapotdemo supplied by MATLAB to investigate the effects of lighting on visualization. The demo has a console window that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required