This functionality does not run in MATLAB.
plot::PointLight([x, y, z], <intensity>, <a = amin .. amax>, options)
plot::PointLight([x, y, z], intensity)) generates a point light at the position (x, y, z).
Each 3D scene is illuminated by several light sources that are set automatically and cannot be controlled by the user. Cf. the help page of Lighting.
If at least one user defined light source is inserted into the scene (e.g., by simply passing the light objects as input parameters to the plot command), the automatic lights are switched off and the user defined lights are used to illuminate the scene.
plot::PointLight([x, y, z], intensity) creates a point light at the position (x, y, z). It emits light into all directions.
Unlike in real life, the light flux of a point light does not decrease with the distance to the light source.
By default, white light is created. Other colors can be chosen by the attribute LightColor.
When using the attribute CameraCoordinates = TRUE, the light source is fixed to the camera. It moves automatically, when the camera is moved.
Light sources such as plot::PointLight create shading effects that add depth to the picture.
Usually, you will use point lights to highlight special details of the scene. For the illumination of the entire scene you will usually need additional undirected ambient light of type plot::AmbientLight, too.
Note that all light sources create a homogeneous lighting effect for a 3D triangle. Thus, realistic shading effects can only be achieved for surfaces with a sufficiently fine triangulation. For function graphs (plot::Function3d) and parametrized surfaces (plot::Surface), a fine triangulation is created by sufficiently high values of XMesh, YMesh or UMesh, VMesh, respectively.
|CameraCoordinates||position of light sources relative to the camera?||FALSE|
|Frames||the number of frames in an animation||50|
|LightColor||the color of light||RGB::White|
|LightIntensity||intensity of light||1.0|
|Name||the name of a plot object (for browser and legend)|
|ParameterEnd||end value of the animation parameter|
|ParameterName||name of the animation parameter|
|ParameterBegin||initial value of the animation parameter|
|ParameterRange||range of the animation parameter|
|Position||positions of cameras, lights, and text objects|
|PositionX||x-positions of cameras, lights, and text objects|
|PositionY||y-positions of cameras, lights, and text objects|
|PositionZ||z-positions of cameras, lights, and text objects|
|TimeEnd||end time of the animation||10.0|
|TimeBegin||start time of the animation||0.0|
|TimeRange||the real time span of an animation||0.0 .. 10.0|
We create three blue surfaces and illuminate them by an animated point light. The position of the point light is indicated by a white point:
s1 := plot::Surface([1, y, z], y = 0..1, z = 0..1): s2 := plot::Surface([x, 1, z], x = 0..1, z = 0..1): s3 := plot::Surface([x, y, 0], x = 0..1, y = 0..1): p := plot::Point3d([a, 0.9, 0.2], a = 0..1, PointSize = 2.0*unit::mm, PointColor = RGB::White): light := plot::PointLight([a, 0.9, 0.2], 1, a = 0..1): plot(s1, s2, s3, p, light, Axes = Frame, FillColor = RGB::Blue, FillColorType = Flat):
delete s1, s2, s3, p, light:
x, y, z
The coordinates of the point light: numerical values or arithmetical expressions of the animation parameter a.
The intensity of the light: a numerical value between 0 and 1 or an arithmetical expression of the animation parameter a.
intensity is equivalent to the attribute LightIntensity.
Animation parameter, specified as a = amin..amax, where amin is the initial parameter value, and amax is the final parameter value.