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 mirror‐reflection 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 allBasic Examples (3)
Scope (7)
Lighting Specification (4)
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:
Generalizations & Extensions (2)
Applications (3)
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)
Text
Wolfram Research (2021), PointLight, Wolfram Language function, https://reference.wolfram.com/language/ref/PointLight.html.
CMS
Wolfram Language. 2021. "PointLight." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PointLight.html.
APA
Wolfram Language. (2021). PointLight. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PointLight.html