LightIntensity

Intensity of light

Value Summary

OptionalArithmetical expression between 0 and 1

Description

LightIntensity governs the intensity of user defined light sources such as plot::AmbientLight, plot::DistantLight etc.

The intensity of all user defined light source can be set by Intensity = intensity. The value intensity must be a number between 0 and 1. Values smaller than 0 or larger than 1 are accepted and handled like 0 or 1, respectively.

This attribute can be animated.

Undirected ambient light of intensity 1 dominates all other light sources.

Examples

Example 1

When generating a light source of type plot::DistantLight, the third argument is the light intensity. Internally, this value is stored as the attribute LightIntensity and can be accessed and changed as the corresponding slot of the light object:

light := plot::DistantLight([2, -1, 3], [0, 0, 0], 0.5):
light::LightIntensity

light::LightIntensity:= 0.4:
light::LightIntensity

We illuminate a function plot by two distant lights with animated intensities:

plot(plot::Function3d(exp(-x^2 - y^2), x = -2..2, y = -2..2),
     plot::DistantLight([5, -1, 3], [0, 0, 0], 1 - a, a = 0..1),
     plot::DistantLight([-3, 5, 2], [0, 0, 0], a, a = 0..1)):

delete light:

See Also

MuPAD Functions

Was this topic helpful?