C.G.chapter 1 Notes
C.G.chapter 1 Notes
Representation of a point:
In 2 – dimensional space a point is represented by its coordinates P (x, y).
𝑥
The same point can be represented as a 1 x 2 row matrix [𝑥 𝑦] or 2 x 1 column matrix [𝑦]
It is called as the position vector matrix denoted by [X].
𝑥
i.e. [𝑋] = [𝑥 𝑦] 𝑜𝑟 [𝑦]
𝑎 𝑏
The general 2 x 2 transformation is given by [𝑇] = [ ]
𝑐 𝑑
Transformation of a point:
𝑎 𝑏
Let [𝑇] = [ ] be any 2 x 2 general transformation matrix. Consider a point P with
𝑐 𝑑
position vector matrix [𝑋] = [𝑥 𝑦].
Apply [T] on [X],
[𝑋][𝑇] = [𝑥 𝑦] [𝑎 𝑏 ]
𝑐 𝑑
= [𝑎𝑥 + 𝑐𝑦 𝑏𝑥 + 𝑑𝑦]
= [𝑥′ 𝑦′]
= [𝑋′]
∴ [𝑋′] = [𝑋][𝑇]
Scaling in 2 – D.
Note:
1. If 𝑎 = 𝑑, then the scaling is uniform.
2. If 𝑎 ≠ 𝑑, then the scaling is not uniform.
3. If 𝑎 = 𝑑 > 1, then equal enlargement occurs in both the direction.
4. If 0 < 𝑎 = 𝑑 < 1, then equal compression occurs in both the direction.
Midpoint Transformation
𝑎 𝑏
Consider a line 𝐴𝐵 with 𝐴[𝑥1 𝑦1 ] and 𝐵[𝑥2 𝑦2 ]. Let [𝑇] = [ ] be the general 2 × 2
𝑐 𝑑
transformation matrix.
𝑥1 +𝑥2 𝑦1 +𝑦2
Midpoint of line 𝐴𝐵 is [𝑀] = [ ]
2 2
𝑥1 𝑦1
The position vector matrix of line 𝐴𝐵 is, [𝑋] = [𝑥 𝑦2 ].
2
𝑎 𝑏
Let [𝑇] = [ ] be any 2 × 2 transformation matrix.
𝑐 𝑑
Applying [𝑇] on the position vectors of line 𝐴𝐵.
𝐴 𝑥1 𝑦1 𝑎 𝑏
[ ] [𝑇] = [𝑥 𝑦2 ] [ 𝑐 ]
𝐵 2 𝑑
𝑎𝑥 + 𝑐𝑦1 𝑏𝑥1 + 𝑑𝑦1
= [ 1 ]
𝑎𝑥2 + 𝑐𝑦2 𝑏𝑥2 + 𝑑𝑦2
𝑥′ 𝑦1′
= [ 1′ ]
𝑥2 𝑥2′
𝐴′
= [ ′]
𝐵
The slope of the transformed line
𝑦 ′ −𝑦 ′
𝑚′ = 𝑥2′ −𝑥1′
2 1
𝑦 −𝑦
𝑏+𝑑( 2 1 )
𝑥2 −𝑥1
= 𝑦 −𝑦
𝑎+𝑐( 2 1 )
𝑥2 −𝑥1
𝑏+𝑑𝑚
𝑚′ = 𝑎+𝑐𝑚
Since m, a, b, c, d is same for lines 𝐴𝐵 and 𝐸𝐹 thus 𝑚′ is also same for both the
transformed lines.
Hence, the transformed lines are parallel.
Theorem: If the line 𝑦 = 𝑚𝑥 + ℎ is transformed onto the line 𝑦 ′ = 𝑚′ 𝑥 ′ + ℎ′ under
𝑎 𝑏
the transformation matrix [𝑇] = [ ] then
𝑐 𝑑
𝑏+𝑑𝑚 𝑎𝑑−𝑏𝑐
𝑚′ = and ℎ′ = ℎ ( 𝑎+𝑐𝑚 )
𝑎+𝑐𝑚
[𝑃][𝑇] = [𝑥 𝑦 ] [𝑎 𝑏
]
𝑐 𝑑
= [𝑎𝑥 + 𝑐𝑦 𝑏𝑥 + 𝑑𝑦]
= [𝑥 ′ 𝑦 ′]
= 𝑃′
Here, 𝑥 ′ = 𝑎𝑥 + 𝑐𝑦 and 𝑦 ′ = 𝑏𝑥 + 𝑑𝑦
Substituting 𝑥 ′ , 𝑦 ′ , 𝑚′ in 𝑦 ′ = 𝑚′ 𝑥 ′ + ℎ′
𝑏 + 𝑑𝑚
𝑏𝑥 + 𝑑𝑦 = (𝑎𝑥 + 𝑐𝑦) ( ) + ℎ′
𝑎 + 𝑐𝑚
The point [0 ℎ] lies on the line 𝑦 = 𝑚𝑥 + ℎ
𝑏 + 𝑑𝑚
𝑑ℎ = 𝑐ℎ ( ) + ℎ′
𝑎 + 𝑐𝑚
𝑏 + 𝑑𝑚
ℎ′ = 𝑑ℎ − 𝑐ℎ ( )
𝑎 + 𝑐𝑚
𝑎𝑑 − 𝑏𝑐
ℎ′ = ℎ ( )
𝑎 + 𝑐𝑚
Transformation of Intersecting Lines
Consider a pair of straight lines,
𝑦 = 𝑚1 𝑥 + 𝑏1
𝑦 = 𝑚2 𝑥 + 𝑏2
Here, 𝑚1 ≠ 𝑚2
Rewriting the above equations as,
−𝑚1 𝑥 + 𝑦 = 𝑏1
−𝑚2 𝑥 + 𝑦 = 𝑏2
The matrix representation of the above system is,
𝑦] [−𝑚1 −𝑚2
[𝑥 ] = [𝑏1 𝑏2 ]
1 1
If the solution to this pair of equations exists then the lines intersect, if not, then they are
parallel.
A solution to this system can be obtained by matrix inversion method.
i.e., [𝑋] = [𝐵][𝑀]−1
1 1 𝑚2
[𝑀]−1 = [ ]
𝑚 2 −𝑚1 −1 −𝑚1
∴ [𝑋] = [𝐵][𝑀]−1
1⁄ 𝑚2
(𝑚2 − 𝑚1 ) ⁄(𝑚 − 𝑚 )
2 1
= [𝑏1 𝑏2 ] [ −𝑚2 ]
−1⁄ ⁄
(𝑚2 − 𝑚1 ) (𝑚2 − 𝑚1 )
𝑏1 − 𝑏2 𝑏1 𝑚2 − 𝑏2 𝑚1
[𝑋] = [ ] … … … … … … … … (∗)
𝑚2 − 𝑚1 𝑚2 − 𝑚1
Eq. (*) represents the point of intersection of the original lines.
𝑎 𝑏
Let [𝑇] = [ ]
𝑐 𝑑
Applying [𝑇] on the two straight lines, we get,
𝑦 ′ = 𝑚1′ 𝑥 ′ + 𝑏1′
𝑦 ′ = 𝑚2′ 𝑥 ′ + 𝑏2′
The slope of these two lines is,
𝑏+𝑑𝑚1 𝑏+𝑑𝑚2
𝑚1′ = 𝑚2′ =
𝑎+𝑐𝑚1 𝑎+𝑐𝑚2
𝑎𝑑−𝑏𝑐 𝑎𝑑−𝑏𝑐
𝑏1′ = 𝑏1 (𝑎+𝑐𝑚 ) 𝑏2′ = 𝑏2 (𝑎+𝑐𝑚 )
1 2
Consider a point P in the xy – plane with the position vector [𝑋] = [𝑥 𝑦]. Let 𝑂𝑃 = 𝑟 and
∠𝑋𝑂𝑃 = ∅. The polar coordinates of the point P are given by,
𝑥 = 𝑟 cos ∅ , 𝑦 = 𝑟 sin ∅
Let the point 𝑃′ be rotated about the origin through an angle 𝜃 so that the point P is
transformed to the point 𝑃′ with position vector [𝑋 ′ ] = [𝑥 ′ 𝑦 ′ ].
The polar coordinates of the point 𝑃′ is given by,
𝑥 ′ = 𝑟 cos(𝜃 + ∅) , 𝑦 ′ = 𝑟 sin(𝜃 + ∅)
Now 𝑥 ′ = 𝑟 cos(𝜃 + ∅)
= 𝑟(cos ∅ cos 𝜃 − sin ∅ sin 𝜃)
= (𝑟 cos ∅) cos 𝜃 − (𝑟 sin ∅) sin 𝜃
𝑥 ′ = 𝑥 cos 𝜃 − 𝑦 sin 𝜃 … … … … … … … . (1)
Also, 𝑦 ′ = 𝑟 sin(𝜃 + ∅)
= 𝑟(sin ∅ cos 𝜃 + cos ∅ sin 𝜃)
= (𝑟 sin ∅) cos 𝜃 + (𝑟 cos ∅) sin 𝜃
𝑦 ′ = 𝑦 cos 𝜃 + 𝑥 sin 𝜃
𝑦 ′ = 𝑥 sin 𝜃 + 𝑦 cos 𝜃 … … … … … … … . (2)
The equations (1) and (2) can be written in the matrix form as,
[𝑥 ′ 𝑦 ′ ] = [𝑥 𝑦] [ cos 𝜃 sin 𝜃
]
− sin 𝜃 cos 𝜃
cos 𝜃 sin 𝜃
Thus, the matrix [𝑇] = [ ] is the required matrix for rotation about origin.
− sin 𝜃 cos 𝜃
Note:
i. The rotation is considered positive in anti – clockwise direction whereas negative in
clockwise direction.
cos 𝜃 sin 𝜃
ii. The rotation matrix [𝑇] = [ ] has the property that its inverse is equal to
− sin 𝜃 cos 𝜃
its transpose,
[𝑇]−1 = [𝑇]𝑡 = [cos 𝜃 −sin 𝜃 ]
sin 𝜃 cos 𝜃
A matrix having this property is called an orthogonal matrix. Thus, the rotation
matrix is an orthogonal matrix.
𝑎 𝑏
Let [𝑇] = [ ] be the transformation matrix.
𝑐 𝑑
Applying [𝑇] on the position vectors of the unit square OABC, we get,
𝑂 0 0
𝐴 [𝑇] 1 0 𝑎 𝑏
[ ] =[ ][ ]
𝐵 1 1 𝑐 𝑑
𝐶 0 1
0 0 𝑂′
𝑎 𝑏 𝐴′
=[ ] = [ ′]
𝑎+𝑐 𝑏+𝑑 𝐵
𝑐 𝑑 𝐶′
2. Find the concatenated transformation matrix for the following: First shearing in x and
y directions by -2.4 and 1.1 units respectively, followed by a rotation about the origin
through an angle 20° . Apply this onto the point 𝑃[−1 3].
Homogeneous Coordinates:
Consider a point in 2 – dimensional plane with position vector [𝑋] =
[𝑥 𝑦]. The homogeneous coordinate of a non – homogeneous point with position vector [𝑥 𝑦]
are [𝑥 ′ 𝑦 ′ ℎ], where h is any real number 𝑥 ′ = ℎ𝑥, 𝑦 ′ = ℎ𝑦.
i.e. [ℎ𝑥 ℎ𝑦 ℎ].
In particular, if ℎ = 1 then the homogeneous coordinate of a point 𝑃[𝑥 𝑦] = [𝑥 𝑦 1]
Problems:
1. Find the combined transformation matrix for the following sequence of
transformations: Reflection through the line 𝑦 = −𝑥, followed by shearing in x and y
– direction by 3 and -4 units respectively, followed by translation in x and y – direction
by -1 and -2 units. Apply it on the point 𝑃[3 − 8].
2. Find the combined transformation matrix and apply the sequence on the line segment
between the points 𝐴[2 − 1] and 𝐵[1 − 3]. First translate in y – direction by -3 units
and then rotate about the origin through an angle −65°.
3. Show that the combined two-dimensional transformation first reflection about x – axis
and then about the line 𝑦 = −𝑥 is identical to rotation about the origin by an angle 𝜃 =
270°.
Consider an arbitrary point 𝑃[𝑥 𝑦] in the plane. The rotation about an arbitrary point P is
accomplished by the following sequence of transformations:
1. Translate the point 𝑃[𝑥 𝑦] to the origin 𝑂[0 0] i.e., translating in x – direction by -
x units and in y – direction by -y units respectively.
Thus, the transformation matrix is,
1 0 0
[𝑇1 ] = [ 0 1 0]
−𝑥 −𝑦 1
2. Rotate the point about the origin through an angle 𝜃.
Thus, the transformation matrix is,
cos 𝜃 sin 𝜃 0
[𝑇2 ] = [− sin 𝜃 cos 𝜃 0]
0 0 1
3. Apply inverse translation i.e. translate the point back to the original position.
Thus, the transformation matrix is,
1 0 0
[𝑇3 ] = [0 1 0] = [𝑇1 ]−1
𝑥 𝑦 1
Thus, the transformation matrix for rotation about an arbitrary point is,
[𝑇] = [𝑇1 ][𝑇2 ][𝑇1 ]−1
Problems:
1) An object is rotated about the point 𝑃[−1 2] through an angle 𝜋 𝑐 . Find the
transformation matrix.
2) Find the combined transformation matrix for a 30° rotation about the point 𝑃[−1 1].
Apply this rotation onto the ∆𝐴𝐵𝐶 with 𝐴[2 1], 𝐵[−2 3], 𝐶[−3 1].
3) Rotate the line segment between the points 𝐴[3 5] and 𝐵[4 1] about the point 𝑃[2 1]
through an angle 90° .