Intensity of light
MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
|Optional||Arithmetical expression between 0 and 1|
The intensity of all user defined light source can be set by
= intensity. The value
be a number between 0 and 1.
Values smaller than 0 or
larger than 1 are accepted
and handled like 0 or 1,
This attribute can be animated.
Undirected ambient light of intensity 1 dominates all other light sources.
When generating a light source of type
plot::DistantLight, the third argument
is the light intensity. Internally, this value is stored as the attribute
can be accessed and changed as the corresponding slot of the light
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)):