Page 129 - DCAP504_Computer Graphics
P. 129
Computer Graphics
The matrices that are used to achieve rotation can be shown as,
Here, φ is the angle of rotation. Above given are the matrices for achieving rotation about x, y or z
coordinate axes.
Positive values for the rotation angle define counter clockwise equations about the
rotation point and negative values rotate objects in the clockwise direction.
If the values of θ are negative, then for clockwise rotation the matrix becomes
cos( − θ) sin( − θ)
R =
− sin( − θ) cos( − θ)
Here, cos (-θ) =cos θ and sin (-θ) =-sin θ, Therefore,
cos θ −sin θ
R =
sin θ cos θ
8.2.4 3-D Clipping
Clipping is the process of removing objects that are not visible from the scene. The clipping process
helps in reducing the computational effort. It can be obtained by following two steps:
1. Deleting objects that cannot be viewed. e.g., objects behind camera, outside the view field or that
are too far from sight.
2. Also remove the object that intersects with the clipping plane.
Text clipping
Text can be represented through clipping. With respect to text, clipping can be divided into area and
line clipping. Area clipping comes into picture when bitmaps are used to represent characters. When
characters are represented by lines, line clipping is implemented. But in general cases, characters are a
combination of lines and curves. Hence, they are called vectors.
122 LOVELY PROFESSIONAL UNIVERSITY