This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / Built-in Functions / Graphics and Sound / 3D Options  /
LightSources

  • LightSources is an option for Graphics3D and related functions that specifies the properties of point light sources for simulated illumination.
  • The basic form is LightSources -> , , ... , where the are the specifications for each light source. Each has the form direction , color . The direction is specified as x , y , z , where the components are with respect to the final display area. The and are horizontal and vertical in the plane of the display; is orthogonal to the display. Positive is in front. Only the relative magnitude of the components is relevant; the overall normalization of the vector is ignored. The color can be specified by GrayLevel, Hue or RGBColor.
  • Simulated illumination determines the shading of polygons in three-dimensional pictures.
  • The shading of a particular polygon is computed as a sum of contributions from point light sources, plus a contribution from ambient light.
  • Surface properties of polygons are specified by SurfaceColor directives.
  • Light reflection properties assumed for polygons are described in the notes for SurfaceColor.
  • See the Mathematica book: Section 2.9.12.
  • See also: AmbientLight.

    Further Examples

    The first plot uses the default settings for LightSources; the second resets them.

    Evaluate the cell to see the graphic.

    In[1]:=

    In[2]:=