PointLight

PointLight[col,pt]

is a three-dimensional graphics directive that specifies the point light of color col at position pt to use in coloring 3D surfaces.

PointLight[col,pt,att]

uses the point light with geometric attenuation att.

Details

  • PointLight is also known as spherical point light.
  • PointLight is typically used to illuminate certain sections of an object by casting light rays that spread evenly in all directions.
  • PointLight[col,pt] yields a light that emanates from the point pt but does not attenuate with distance.
  • Colors of light sources col can be defined by RGBColor, Hue or any other color specification.
  • The setting for PointLight affects only colors associated with diffuse and specular reflection on a 3D surface.
  • Light sources with color specifications of the form {dcol,Specularity[scol]} are effectively taken to have colors dcol for purposes of diffuse reflection, and scol for purposes of specular reflection.
  • Diffuse reflection is taken to follow Lambert's law, with light effectively scattered equally in all directions from a surface.
  • Specular reflection effectively takes light to be scattered only close to the mirrorreflection direction, as specified in the notes for Specularity.
  • Light source positions pt can be specified as follows:
  • {x,y,z}explicit coordinates that move with the graphic
    Scaled[{x,y,z}]scaled coordinates that move with the graphic
    ImageScaled[{x,y,z}]coordinates fixed relative to the final displayed image
  • In ImageScaled[{x,y,z}], the and run from 0 to 1 across the width and height of the bounding box of the final displayed image. The coordinate runs orthogonal to the plane of the display, and is 0 at the back of the 3D region and 1 at the front.
  • Coordinates specified in Scaled and ImageScaled will often not be between 0 and 1.
  • PointLight[col,pt,{a,b,c}] yields a light that attenuates like with distance .

Examples

open allclose all

Basic Examples  (3)

Point light on surfaces:

Style a surface in a plot:

A point light from the top of the specular surface:

Scope  (7)

Lighting Specification  (4)

Specify a spherical point light source by a color and a position:

Point lights with different colors:

Point lights at various positions:

Point lights on specular surfaces:

Lighting Positions  (2)

Specify the light source position in the graphics coordinate system by default:

The light source moves with the graphic when the viewpoint changes:

Specify the light position by a fraction of the graphics coordinates using Scaled:

The light source moves with the graphic when the viewpoint changes:

Lighting Attenuation  (1)

By default, point lights are not affected by the distance from an object:

Specify a point light that attenuates with respect to the distance:

Specify a point light that attenuates by the square of the distance:

Generalizations & Extensions  (2)

Specify lighting for each object:

Specify lighting within the graphics:

Applications  (3)

Set up four white spheres on a plane:

Point light:

Different light instruments at the corner points:

Build a scene with multiple objects and light sources:

Animate the spotlights:

Properties & Relations  (6)

Surface color and lighting interact with each other:

Diffuse object and lighting colors can be exchanged and produce the same effect:

Specular object and lighting colors can be exchanged and produce the same effect:

Specularity gives mirror-like reflection:

The final color is a linear combination of all the surface colors as well as lighting:

Point light yields rays toward all the directions from the position:

Possible Issues  (2)

The default light scheme uses several colored light sources:

Set Lighting to None to turn off the default lights:

Flat surfaces may show little or no reflection:

Neat Examples  (1)

A simple light show:

Wolfram Research (13), PointLight, Wolfram Language function, https://reference.wolfram.com/language/ref/PointLight.html.

Text

Wolfram Research (13), PointLight, Wolfram Language function, https://reference.wolfram.com/language/ref/PointLight.html.

CMS

Wolfram Language. 13. "PointLight." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PointLight.html.

APA

Wolfram Language. (13). PointLight. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PointLight.html

BibTeX

@misc{reference.wolfram_2021_pointlight, author="Wolfram Research", title="{PointLight}", year="13", howpublished="\url{https://reference.wolfram.com/language/ref/PointLight.html}", note=[Accessed: 24-January-2022 ]}

BibLaTeX

@online{reference.wolfram_2021_pointlight, organization={Wolfram Research}, title={PointLight}, year={13}, url={https://reference.wolfram.com/language/ref/PointLight.html}, note=[Accessed: 24-January-2022 ]}