Image Processing Reference
In-Depth Information
(b) Phong shading [Phong75, Watt98]
In step (2) and subsequent steps in the above procedure, determine normal
vectors of each point by the linear interpolation and calculate brightness values
of each point using those normal vectors.
7.6.3 Depth coding
A simpler method of shading so that a brighter value is given to a plane or
point nearer to an image plane H P (or nearer to the viewpoint) is available
for rendering a plane surface. That is,
I = I i / ( k 1 + k 2 d ) ,
(7.10)
where
I = brightness value at a point P on a display image plane H P
(= density
value of a 2D projection image),
I i = brightness value (density value of an image on H P ) given to the point
P of H P
corresponding to the point nearest to an image plane H P
in 3D
space,
d = distance to an arbitrary point P in virtual 3D space from an image plane
H P ,
k 1 ,k 2 = parameters.
This method is called depth coding . Although this procedure is not always a
direct analogy of the optical phenomenon, it is frequently used because the
computation is simple and is performed relatively easily, and still can give
perspective to a resultant image.
7.6.4 Ray tracing
Drawing a scene in the 3D world viewed from a suitably selected viewpoint
is regarded as putting a plane corresponding to a 2D image plane between
aviewpointV E and an object and projecting 3D space and the object with
which we have interest onto the image plane. The projection here is performed
by generating a line toward a point P from the viewpoint V E and extending
the line to find a point Q, where the line intersects an object nearest to
the viewpoint V E . We call a line from the viewpoint to an object a ray and
generation of a ray ray casting (Fig. 7.10).
After a ray meets the first object at Q 1 , a ray is reflected to the direction
determined by the law of reflection peculiar to the object. The reflected ray
is extended in the direction of reflection. If the ray reaches a light source, we
may find that a ray from the light source is reflected by an object at a point
Q 1 , and reaches to a point P on an image plane. Then we paint a color with
the intensity (brightness) both determined by properties of the light source
and the characteristics of colors and reflection of the object.
Search WWH ::




Custom Search