Examples Scaling
ex 1//Scale the rectangle (12,4),(20,4),(12,8),(20,8) with SX=2,SY=2.
sol//
Solution: (By using the equations)
For the point (12,4)
X1new= 12 * SX =12 * 2 = 24
Y1new= 4 * SY = 4 * 2 = 8
For the point
(20,4) X2new= 20 * SX =20 * 2 = 40
Y2new= 4 * SY = 4 * 2 = 8
For the point (12,8)
X3new= 12 * SX =12 * 2 = 24
Y3new= 8 * SY = 8 * 2 = 16
For the point (20,8)
X4new= 20 * SX = 20 * 2 =40
Y4new= 8 * SY = 8 * 2 = 16
Solution: (by using matrices)
ex 2//Scale the rectangle (12,4),(20,4),(12,8),(20,8) with SX=2, SY=2 so the point (12,4) is the fixed point.
Solution:
1- Translate the object with TX= -12 and TY= -4 so the point (12,4) lies on the origin
(12,4) ===> (0,0)
(20,4) ===> (8,0)
(12,8) ===> (0,4)
(20,8) ===> (8,4)
2- Scale the object by SX=2 and SY=2
(0,0) ===> (0 , 0)
(8,0) ===> (16 , 0)
(0,4) ===> (0 , 8)
(8,4) ===> (16 , 8)
3- Back translate the scaled object with TX= 12 and TY= 4
(0 , 0) ===> (12 ,4)
(16 ,0) ===> (28 , 4)
(0 , 8) ===> (12 ,12)
(16 , 8) ===> (28 ,12)
Example 3// Scale the square (1,2) , (4,2) , (1,5) , (4,5) with 4 units in the X-axis ,and 2 units in the Y-axis.
Solution:
Example 4 /Scale the triangle (80,40),(40,80),(120,80) by 0.25?
sol//
sx=sy=0.25
point(80,40)
x1new=x1*sx=80*0.25=20
y1new=y1*sy=40*0.25=10 (20,10)
point(40,80)
x2new=x1*sx=40*0.25=10
y2new=y1*sy=80*0.25=20 (10,20)
point(120,80)
x3new=x1*sx=120*0.25=30
y3new=y1*sy=80*0.25=20 (30,20)