Color 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.
The value of
LightColor must be an
i.e., a list of three or four numerical values between 0 and 1.
(The fourth value is the opacity entry of an
It is accepted but does not have any effect on the light color.)
LightColor cannot be animated.
We define a white box and illuminate it by a yellow distant light:
b := plot::Box(-1..1, -1..1, -1..1, Color = RGB::White): light := plot::DistantLight([-1, -2, 3], [0, 0, 0], Color = RGB::Yellow): plot(b, light, Axes = None)
We change the color of the light source:
light::LightColor := RGB::Blue: plot(b, light, Axes = None)
delete b, light: