Target point of a light
|Target||Library wrapper for "[TargetX, TargetY, TargetZ]" (3D)||List of 2 or 3 expressions, depending on the dimension|
|TargetX, TargetY, TargetZ||Mandatory||MuPAD® expression|
The value of Target is a list or vector of coordinates. TargetX = x etc. refer to the single coordinates of this list.
These attributes can be animated.
By default, the positions and the targets of light objects are given in model coordinates that have nothing to do with the camera that is used to view the scene.
When using the attribute CameraCoordinates = TRUE, the light source is fixed to the camera. It moves automatically, when the camera is moved.
sunlight := plot::DistantLight([0, 0, 2], [cos(a), sin(a), 1], a = 0..2*PI): spotlight := plot::SpotLight([0, 0, 1], [cos(a), sin(a), 1/2], PI/5, a = 0..2*PI): sunlight::Target, spotlight::Target
We illuminate a paraboloid with sunlight. Its direction is animated by the Target attribute:
f := plot::Function3d(x^2 + y^2, x = -1..1, y = -1..1): plot(f, sunlight, CameraDirection = [-1, -2, 6])
We use the animated spot light:
plot(f, spotlight, CameraDirection = [-1, -2, 6])
delete sunlight, spotlight, f: