SpotLight
✖
SpotLight
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 α.
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 mirror‐reflection 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 allBasic Examples (3)Summary of the most common use cases
Scope (7)Survey of the scope of standard use cases
Lighting Specification (5)
Specify spotlight by position, target position and half-angle:

https://wolfram.com/xid/0enwj995i-v0xid

Spotlights with different colors:

https://wolfram.com/xid/0enwj995i-bgak0c

Spotlights from different positions:

https://wolfram.com/xid/0enwj995i-mitidb

Spotlights with different half-angles:

https://wolfram.com/xid/0enwj995i-iedanq

Spotlights on specular surfaces:

https://wolfram.com/xid/0enwj995i-eaw4d7

Lighting Attenuation (2)
By default, spotlights fall off sharply outside the cone:

https://wolfram.com/xid/0enwj995i-bkvmd0

https://wolfram.com/xid/0enwj995i-eqtigf

A spotlight with different spot exponent has intensity
:

https://wolfram.com/xid/0enwj995i-ftn31w

Spotlight without attenuation:

https://wolfram.com/xid/0enwj995i-gdb3d9

https://wolfram.com/xid/0enwj995i-f18t8k

Spotlight with linear attenuation:

https://wolfram.com/xid/0enwj995i-k2f5d9

Spotlight with quadratic attenuation:

https://wolfram.com/xid/0enwj995i-xtxsn

Generalizations & Extensions (2)Generalized and extended use cases
Applications (3)Sample problems that can be solved with this function
Set up four white spheres on a plane:

https://wolfram.com/xid/0enwj995i-fx1ako

https://wolfram.com/xid/0enwj995i-gncspn

https://wolfram.com/xid/0enwj995i-fkbe89

Different light instruments at the corner points:

https://wolfram.com/xid/0enwj995i-4b321

https://wolfram.com/xid/0enwj995i-b5xhf

Build a scene with multiple objects and light sources:

https://wolfram.com/xid/0enwj995i-kwdbl8

https://wolfram.com/xid/0enwj995i-mqjf2m

Properties & Relations (1)Properties of the function, and connections to other functions
Possible Issues (2)Common pitfalls and unexpected behavior
The default light scheme uses several colored light sources:

https://wolfram.com/xid/0enwj995i-hmqvj9

Set Lighting to None to turn off the default lights:

https://wolfram.com/xid/0enwj995i-m3p8wx

A spotlight on a sphere may display a jagged boundary:

https://wolfram.com/xid/0enwj995i-lcwkz5

Increasing the spot exponent may reduce the effect:

https://wolfram.com/xid/0enwj995i-bebc2f

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.
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.
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
Wolfram Language. (2021). SpotLight. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SpotLight.html
BibTeX
@misc{reference.wolfram_2025_spotlight, author="Wolfram Research", title="{SpotLight}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/SpotLight.html}", note=[Accessed: 27-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_spotlight, organization={Wolfram Research}, title={SpotLight}, year={2021}, url={https://reference.wolfram.com/language/ref/SpotLight.html}, note=[Accessed: 27-March-2025
]}