is an option for ReliefPlot and related functions that specifies the angle from which simulated illumination is taken to come.
LightingAngle
is an option for ReliefPlot and related functions that specifies the angle from which simulated illumination is taken to come.
Details
- Angles are measured in radians, counterclockwise from the positive
direction in the final image. - LightingAngle->{θ,ϕ} takes the effective illumination source to be oriented at angle ϕ out of the image plane.
- LightingAngle->θ is equivalent to LightingAngle->{θ,Pi/4}.
Examples
open all close allBasic Examples (1)
By default, the simulated lighting is placed at
, or the top left corner, with altitude
:
ReliefPlot[Table[Sin[i ^ 2 + j ^ 2], {i, -4, 4, .05}, {j, -4, 4, .05}], ColorFunction -> None]Place the light source at
, or the left of the map:
ReliefPlot[Table[Sin[i ^ 2 + j ^ 2], {i, -4, 4, .05}, {j, -4, 4, .05}], LightingAngle -> 180°, ColorFunction -> None]Place the light source at
, or the right side of the map, with
altitude:
ReliefPlot[Table[Sin[i ^ 2 + j ^ 2], {i, -4, 4, .05}, {j, -4, 4, .05}], ColorFunction -> None, LightingAngle -> {0, Pi / 12}]Scope (2)
ReliefPlot[Table[Sin[i] + Cos[j], {i, -10, 10, .2}, {j, -10, 10, .2}], LightingAngle -> None]Use predefined symbolic directions:
Table[ReliefPlot[
Table[Sin[i] + Cos[j], {i, -10, 10, .2}, {j, -10, 10, .2}], ImageSize -> 100, LightingAngle -> p], {p, {Right, Top, Left, Bottom}}]Neat Examples (1)
Change light source direction continuously:
Animate[ReliefPlot[Table[Sin[i ^ 2 + j ^ 2], {i, -4, 4, .05}, {j, -4, 4, .05}], ColorFunction -> None, MaxPlotPoints -> Infinity, LightingAngle -> θ, BoxRatios -> {1, 1, .2}, ImageSize -> 150], {θ, 0, 2Pi}, AnimationRunning -> False]See Also
History
Text
Wolfram Research (2007), LightingAngle, Wolfram Language function, https://reference.wolfram.com/language/ref/LightingAngle.html.
CMS
Wolfram Language. 2007. "LightingAngle." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/LightingAngle.html.
APA
Wolfram Language. (2007). LightingAngle. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LightingAngle.html
BibTeX
@misc{reference.wolfram_2026_lightingangle, author="Wolfram Research", title="{LightingAngle}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/LightingAngle.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_lightingangle, organization={Wolfram Research}, title={LightingAngle}, year={2007}, url={https://reference.wolfram.com/language/ref/LightingAngle.html}, note=[Accessed: 13-June-2026]}