CG Question bank-1SHUBHAM
CG Question bank-1SHUBHAM
CG Question bank-1SHUBHAM
Solution:
(i)
0 1 0
Ref(y =x) = 1 0 0
0 0 1
(ii)
cos sin
0
0 0
Ry () =
1 0 0
– sin 0 cos 0
0 0 0 1
Solution:
Q4) Find transformation matrix to rotate the object about the origin by 45 degree
i) in the counter-clockwise direction.
ii)Find new coordinates of the point (8,4) after rotation
Solution:
i) Here, rotation direction is counter-clockwise , so θ is positive.
= 45
The transformation matrix is,
cos – sin
M =
sin cos
cos (45) – sin (45)
=
sin (45) cos (45)
1/ 2 – 1/ 2
=
1/ 2 1/ 2
ii) Find new coordinates of the point (8,4) after rotation.
Let us assume P and P’ are original and transformed coordinates of the object respectively.
1/ 2 – 1/ 2 8
P = M P = .
1/ 2 1/ 2 4
2 2
=
6 2
Solution:
0
1 0 0 0
(i) X’Y’Z’1]=
1 0 0
[X Y Z 1]
0 0 1 0
tx ty tz 1
1 0 0 0
Rx () =
0 cos – sin 0
0 sin cos 0
0 0 0 1
2 4 4
Q7) A triangle is defined by . Find transformed coordinates after the
2 2 4
following transformation
(i) 90 rotation about the origin.
(ii) Reflection about line X = Y
Solution:
=
0 – 1 2 4 4 = –2 –2 –4
1 0 2 2 4 2 4 4
Original Coordinate Transformed Coordinate
A(2, 2) A’(– 2, 2)
B(4, 2) B’(– 2, 4)
C(4, 4) C’(– 4, 4)
P = M.P
0 1 – 2 – 2
=
–4
1 0 2 4 4
2 4 4
=
–2 –2 –4
Original Coordinate Transformed Coordinate
A(2, 2) A’(2, – 2)
B(4, 2) B’(4, – 2)
C(4, 4) C’(4, – 4)
Q8) Consider the square A(1,0), B(0,0), C(0,1), D(1,1). Rotate the square ABCD
by 45 anticlockwise about point A(1,0).
Solution:
Q9) What are the types of projection and write in brief about each type of
projections
Solution: types of projections
Solution:
transformation matrix for rotation about z axis in anticlockwise direction
Q11) Explain how to perform rotation about an arbitrary axis in 3D with suitable
diagram
Step 1 : Translate the rotation axis such that it passes through the origin (Refer Fig. (b)).
Step 2 : Rotate the translation axis such that it coincides one of the principal axes (Refer
Fig. (c)).
Step 3 : Perform the actual rotation operation (Refer Fig. (d)).
Step 4 : Perform inverse rotation to bring rotation axis to the original orientation (Refer Fig. (e)).
Step 5 : Perform inverse translation to move back the rotation axis to its original location (Refer
Fig. (f)).
Q12) Perform 90 degree rotation of triangle with vertices A(2,2), B(4,2) and C(3,3)
i). About origin ii). About reference point (– 2,2)
Solution:
Q13) Perform 45 rotation of a triangle A(0, 0), B(1, 1) and C(5, 2). Find
transformed coordinates after rotation, (i) About origin, (ii) About P(– 1, 1).
Solution:
i) Rotation with respect to the origin.
cos – sin 0 0 1 5
P = M·P = sin cos 0 . 0 1 2
0 0 1 1 1 1
–1
1
0
2 2 0 1 5
=
1 1
0 . 0 1 2
1
2 2 1 1
0 0 1
3
0 0
2
7
=
0 2
2
1 1 1
( ) ( ) and C(x y )
Let’s consider A x1 y1 , B x2 y2 3 3
1 1
x1 = – 1 + (0 + 1) – (0 + 1)
2 2
1 1
= –1+ – =–1
2 2
1 1
y1 = – 1 + (0 + 1) + (0 + 1)
2 2
1 1
= –1+ + =–1+ 2
2 2
1 1
x2 = – 1 + (1 + 1) – (1 + 1)
2 2
2 2
= –1+ – =–1
2 2
1 1
y2 = – 1 + (1 + 1) + (1 + 1)
2 2
2 2
= –1+ + =–1+2 2
2 2
1 1
x3 = – 1 + (5 + 1) – (2 + 1)
2 2
6 3 3
= –1+ – =–1+
2 2 2
1 1
y3 = – 1 + (5 + 1) + (2 + 1)
2 2
6 3 9
= –1+ + =–1+
2 2 2
A = (– 1 – 1 + 2),
B = (– 1 – 1 + 2 2),
3 9
C = – 1 + – 1 +
2 2
Original Coordinates Transformed Coordinates
A (0, 0) A(– 1 – 1 + 2)
B (1, 1) B(– 1 – 1 + 2 2)
C (5, 2) 3 9
C– 1 + – 1 +
2 2
Unit 4
Q1) Compare RGB and HSV color model
Q9) How Painter’s algorithm is useful in hidden surface removal? Explain with
their advantages.
Q5) With suitable example write short note on the fractal surfaces
Q6) With suitable example write short note on the fractal lines
Q9) What do you mean by topological and fractal dimension? Define fractals
and give any two examples of fractals
Unit 6
Q1) Explain renaming of a segment with suitable example
Q3) What is a segment? Explain the Segment Table with suitable example