12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

lightanglePurpose2lightangleCreate or position a light object in spherical coordinatesSyntaxDescriptionlightangle(az,el)light_handle = lightangle(az,el)lightangle(light_handle,az,el)[ax el] = lightangle(light_handle)lightangle(az,el) creates a light at the position specified by azimuth andelevation. az is the azimuthal (horizontal) rotation and el is the verticalelevation (both in degrees). The interpretation of azimuth and elevation is thesame as that of the view command.light_handle = lightangle(az,el) creates a light and returns the handle ofthe light in light_handle.lightangle(light_handle,az,el) sets the position of the light specified bylight_handle.[az,el] = lightangle(light_handle) returns the azimuth and elevation ofthe light specified by light_handle.RemarksExamplesSee AlsoBy default, when a light is created, its style is infinite. If the light handlepassed into lightangle refers to a local light, the distance between the lightand the camera target is preserved as the position is changed.surf(peaks)axis vis3dh = light;for az = −50:10:50lightangle(h,az,30)drawnowendlight, camlight, view2-269

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!