Graphics Reference
In-Depth Information
10 Rendering
10.1 Introduction
The rendering phase generates images from geometric description of 3D models using a
collection of virtual light sources. This requires knowledge of the location and type of the light
sources, a description of the illumination model, and knowledge of how light intensities are
mapped onto the geometry.
Vectors play an important role in this phase as they reveal the orientation of surfaces as well
as the direction of light sources and assist in the analysis of how light interacts with objects. So
let's begin with light sources.
10.2 Light sources
Light sources are often classified as point, directional, or spot. A point light source has spatial
position and radiates light uniformly in all directions; a directional light source is located at
infinity and gives rise to a parallel beam of light rays; a spotlight behaves like a torch, which
has position, direction, and an angle associated with its conical beam.
As light sources involve parameters such as direction and magnitude, vectors are the perfect
mathematical tool to describe and analyze their behavior. Although a vector is used to encode
direction, individual scalars represent intensity and color; however, there is no reason why these
color values could not also be treated as a vector. To simulate the influence a point light source
has on a surface, we only need to define a vector between the position of the light source and
some point on the illuminated surface. A vector L is used to represent a beam of photons (light)
leaving the light source L and arriving at the point P, as shown in Fig. 10.1.
It is convenient to arrange for the vector L to point towards the light source, which is given by
L X
P X
=
L Y
P Y
L
L Z
P Z
where L and P locate the light source and illuminated point, respectively.
225
Search WWH ::




Custom Search