Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
light
creates a light object in the given axes
Calling Sequence
l=light() l=light(<LightProperty>) l=light(axes_handle, <LightProperty>)
Arguments
- axes_handle
The handle of the axes, if ommited is used the current axes.
- <LightProperty>
Optional argument specifying the light properties. The optional arguments are set using sintax:
"light(propname1=propvalue1, propname2=propvalue2, ..., propnameN=propvalueN)"
.Following there is the list of optional arguments:
- visible:
This field defines if the light is enabled
"on"
or disabled"off"
.- type:
This field defines the type of light used. There are two types available:
"directional"
and"point"
. Directional lights are positioned infinitely far from the surface thus emitting parallel rays.Point lights are defined as a point in space thus emitting rays in all directions. The default value is
"point"
.- direction:
This field defines the ray direction for directional light. The direction can be chaged using a 3 element vector
"[x, y, z]"
representing a vector starting from the origin.The default value is
"[0 0 1]"
.- position:
This field defines the light position for point light. The position can be changed using a 3 element vector
"[x, y, z]"
.The default value is
"[0 0 1]"
.- ambient_color:
This field defines the ambient color of the light. The color is defined by a 3 element vector
"[red, green, blue]"
with each element in the range [0, 1].The default value is
"[0.1 0.1 0.1]"
.- diffuse_color:
This field defines the diffuse color of the light. The color is defined by a 3 element vector
"[red, green, blue]"
with each element in the range [0, 1].The default value is
"[1 1 1]"
.- specular_color:
This field defines the specular color of the light. The color is defined by a 3 element vector
"[red, green, blue]"
with each element in the range [0, 1].The default value is
"[1 1 1]"
.
Description
The light
function, creates a light entity (see light_property for the light entity properties) in the specified axes
and sets the properties specified with <LightProperty> optional arguments.
For a more detailed explanation about how lighting affects the surface appearance see lighting.
See Also
- lighting — Lighting overview
- light properties — Light overview
- surface properties — description of the 3D entities properties
- delete — Deleta uma entidade gráfica e seus galhos
Report an issue | ||
<< lighting | lighting | light properties >> |