Java Reference
In-Depth Information
Figure 10. Spot light and results
Spread Angle (0 to 90 degrees)
Spread Angle 22.5 degree
Concentration 128.0
Spread Angle 22.5 degree
Concentration 0
Spread Angle 90 degree
Concentration 0
spot lIGht or cone lIGht
In a certain sense, spot light is a kind of point light. However, rather than emitting in all
directions, the light will emitted towards a principal direction as illustrated in Figure 10.
As for spot lights in the real world, using a spot or cone light enables certain objects to be
highlighted.
Lines 37 and 38 in Figure 6 create an example spot light source by using SpotLight().
The first three arguments in this constructor are the same as those for point light, while
the last three parameters give the direction of the light, its spread angle and its concentra-
tion. The range of the spread angle is from 0 to 0.5pi, while the concentration is from 0 to
128 for a focused and unfocused light, respectively. The effects of having different spread
angle and concentration are illustrated in Figure 10.
lIGht scopes
In Java 3D, the region of influence of a light source object can be controlled by setting
appropriate Bounds or BoundingLeaf for the object. More exactly, this influence can be
Search WWH ::




Custom Search