Skip to content

camlight

Add a camera-following light source.

camlight
camlight(az, el)
camlight('headlight')

Adds a light positioned relative to the current camera. 'headlight' (default) puts the light at the camera position. camlight(az, el) positions the light at the given azimuth/elevation offset from the camera.

The light moves with the camera as the user rotates the view, keeping illumination consistent.

surf(peaks); camlight
  • light — Add a directional or point light source to a 3D scene.
  • lightangle — Add or position a light source by azimuth and elevation.
  • lighting — Set the lighting model on a surface.