| Products & Services | Industries | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
lightangle(az,el)
light_handle = lightangle(az,el)
lightangle(light_handle,az,el)
[az,el] = lightangle(light_handle)
lightangle(az,el) creates a light at the position specified by azimuth and elevation. az is the azimuthal (horizontal) rotation and el is the vertical elevation (both in degrees). The interpretation of azimuth and elevation is the same as that of the view command.
light_handle = lightangle(az,el) creates a light and returns the handle of the light in light_handle.
lightangle(light_handle,az,el) sets the position of the light specified by light_handle.
[az,el] = lightangle(light_handle) returns the azimuth and elevation of the light specified by light_handle.
By default, when a light is created, its style is infinite. If the light handle passed in to lightangle refers to a local light, the distance between the light and the camera target is preserved as the position is changed.
surf(peaks) axis vis3d h = light; for az = -50:10:50 lightangle(h,az,30) drawnow end
Lighting as a Visualization Tool for more information about lighting
Lighting for related functions
![]() | Light Properties | lighting | ![]() |

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 |