Professional Documents
Culture Documents
Declaration :
I declare that this assignment is my individual work. I have not copied from any
other student’s work or from any other source except where due
acknowledgement is made explicitly in the text,nor has any part been written for
me by another person.
Evaluator’s comments :
________________________________________________________________
___________
X’ sx 0 0 0 x0
Y’ 0 sy 0 0 y0
Z’ = 0 0 sz 0 z0
1 0 0 0 1 1
P’=s.p
Where scaling parameters sx,sy,sz are assigned any positive values.
X’=x.sx
Y’=y.sy
Z’=z.sz
Scaling an object with transformation changes the size of object and repositions
the object relative to coordinate origin. Also if the transformations parameters
are not all equal,relative dimentions in the object are changed.we preserve the
original shape of the object with a uniform scaling(sx=sy=sz).
With regard to the representation of characters, we can split clipping into area
clipping or line clipping. Area clipping is used in the case where characters are
represented by a bitmap, and line clipping is practical if characters are
represented by lines. But, in the majority of cases we use characters composed
from lines and curves, so-called vectors. Its advantage is that we can zoom or
scale, without a loss of quality.
According to how precise we want the clipping of a text, we categorize clipping
a text as follows:
• precise clipping
• clipping to a character
• clippinga text by words or whole row.
In normal text coding, each character is represented by one value totaling 1 byte.
In clipping, we should look at a character as an inseparable object. Every
character comprises a minimum rectangle, which we will call a 'character
envelope'. While clipping a character to a character, we test whether the center
of an envelope is in the display box, or whether the envelope is wholly inside the
display box or not. On the basis of this we decide whether to display the given
character.
Q3 Find the transformation which aligns vector V=I+J+K with the vector
N=2I-J-K.
Ans: The transformation which aligns vector V=I+J+K with the vector N=2I-J-
K
√ 6/ √ 3 - 1/√ 3√ 6 -1/√ 3√ 6 0
0 1/√ 6 -1/√ 6 0
1/√ 3 1/√ 3 1/√ 3 0
1 0 0 1
v= i+j+k so,
| v |= √ 12 + 12 + 12 = √ 3
And N = 2i –j-k
so, |N|= √ 22 + (-12) +(- 12)= √ 4+1+1=√ 6
Part b
Q.4. Obtain the rotation matrices about x-axis,y-axis and z-axis in 3D.
Z-Axis Rotation
( cos q sin q 0 0)
Rz (q) = (-sin q cos q 0 0)
(0 0 1 0)
(0 0 0 1)
X-Axis Rotation
(1 0 0 0)
Rx(q) = (0 cos q sin q 0)
(0 -sin q cos q 0)
(0 0 0 1)
(cos q 0 -sin q 0)
Ry(q) = (0 1 0 0)
(sin q 0 cos q 0)
(0 0 0 1)
Ans: The computational cost of computing a bounding volume for an object, the
cost of updating it in applications in which the objects can move or change
shape or size, the cost of determining intersections, and the desired precision of
the intersection test. The precision of the intersection test is related to the
amount of space within the bounding volume not associated with the bounded
object.
The purpose of 3D clipping is to identify and save all surface segments within
the view volume fordisplay on the output device. All parts of objects
that are outside the view volume are discarded.
The window to view port transformation equations are:-
xv = xv min +(xw-xw min )sx
yv=yv min +( yw- yw min ) sy
Thus the computing time is saved. A finite view volume is obtained by limiting
the extent of the volume in the zv direction.this is done by specifying the
positions for one or two additional boundary planes.these zv boundary plane are
reffered to as front plane and back plane.front and back clipping allows us to
eliminate parts of the scene that we would like to view and exclude objects that
are in front or of behind the part that we want to look at.also in a perspective
projection we can use the front clipping plane to take out the large projects close
to the view plane that can project into unrecognizable sections with in a view
window.similarly back clipping planes can be used to cut out objects far from
the projection reference reference point that can project to small blots on the
output device.the front and back planes can be in any position relative to the
view plane as long as the projection reference point is not in between the front
and back planes.
Line clipping:
Remove portion of line segment outside window.
Polygon clipping
the most common case in 3D clipping is that we are clipping graphics objects
made up of polygons. we first try to eliminate the entire object using its
bounding volume Next we perform clipping on the individual polygons using
the Sutherland-Hodgman algorithm.
Rasterization
operation to polygon clipping, working with the line segments that form the
edges
of a polygon.The most common application of 3-D clipping is as part of the
process of hidden
surface removal.