SpotLight

SpotLight[col,pt,α]

is a three-dimensional graphics directive to use in coloring 3D surfaces that specifies the spotlight of color col at position pt aimed at the center with half-angle α.

SpotLight[col,{pt1,pt2},α]

uses the spotlight at position pt1 aimed at pt2 with half-angle α.

SpotLight[col,{pt,tar},{α,s},att]

uses the spotlight with spot exponent s and attenuation att.

Details

  • SpotLight is also known as search light.
  • SpotLight is typically used to create intense illumination of objects by casting light rays that spread outward in a cone.
  • SpotLight[col,{pt1,pt2},α] yields a light that emanates from the point pt1 but is restricted to a cone with direction from pt1 to pt2, and with half-angle in radians.
  • Colors of light sources col can be defined by RGBColor, Hue or any other color specification.
  • The setting for SpotLight 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 and aiming points pti 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.
  • SpotLight[col,{pt,tar},{α,s}] gives fall-off away from the center of the cone.
  • SpotLight[col,{pt,tar},{α,s},{a,b,c}}] gives attenuation with distance .

Examples

open allclose all

Basic Examples  (3)

Spotlight on surfaces:

Style a surface in a plot:

A spotlight from the top of the specular surface:

Scope  (7)

Lighting Specification  (5)

Specify spotlight by position, target position and half-angle:

Spotlights with different colors:

Spotlights from different positions:

Spotlights with different half-angles:

Spotlights on specular surfaces:

Lighting Attenuation  (2)

By default, spotlights fall off sharply outside the cone:

A spotlight with different spot exponent has intensity :

Spotlight without attenuation:

Spotlight with linear attenuation:

Spotlight with quadratic attenuation:

Generalizations & Extensions  (2)

Specify lighting for each object:

Specify lighting within the graphics:

Applications  (3)

Set up four white spheres on a plane:

Spotlight:

Different light instruments at the corner points:

Build a scene with multiple objects and light sources:

Animate the spotlights:

Properties & Relations  (1)

A spotlight emits conic rays toward the specified direction:

Possible Issues  (2)

The default light scheme uses several colored light sources:

Set Lighting to None to turn off the default lights:

A spotlight on a sphere may display a jagged boundary:

Increasing the spot exponent may reduce the effect:

Neat Examples  (1)

Random light setups for ring models:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2023_spotlight, author="Wolfram Research", title="{SpotLight}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/SpotLight.html}", note=[Accessed: 29-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_spotlight, organization={Wolfram Research}, title={SpotLight}, year={2021}, url={https://reference.wolfram.com/language/ref/SpotLight.html}, note=[Accessed: 29-March-2024 ]}