creates a light object in the given axes
l=light() l=light(<LightProperty>) l=light(axes_handle, <LightProperty>)
The handle of the axes, if omitted is used the current axes.
Optional argument specifying the light properties. The optional arguments are set using
syntax: "light(propname1=propvalue1, propname2=propvalue2, ..., propnameN=propvalueN)"
.
Following there is the list of optional arguments:
This field defines if the light is enabled "on"
or disabled "off"
.
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"
.
This field defines the ray direction for directional light.
The direction can be changed using a 3 element vector "[x, y, z]"
representing a vector starting from the origin.
The default value is "[0 0 1]"
.
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]"
.
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]"
.
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]"
.
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]"
.
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.