mail  mail@stemandmusic.in
    
call  +91-9818088802
Donate

Scaling

  1. Scaling is a Deformative Transformation that causes Expansion or Shrinking of an Object.
  2. Scaling involves Multiplying a Coordinate Points of an Object by some Scale Factors.In 2D if the Coordinate Point of an Object given by \((x,y)\) is Scaled by a Factor of \((k_x,k_y)\), then the New Point becomes \((k_x \times x,k_y \times y)\). Similarly in 3D if the Coordinate Point of an Object given by \((x,y,z)\) is Scaled by a Factor of \((k_x,k_y,k_z)\), then the New Point becomes \((k_x \times x,k_y \times y,k_z \times z)\). Here \(k_x, k_y \) and \(k_z\) are Scale Factors in direction of x,y and z coordinate axes.
  3. The Scale Factors can only have numerical values greater than zero. Values lesser than 1 in any direction shrink the object in that direction, and values greater than 1 expand it in that direction. A value of 1 keeps the scaling in the corresponding direction unchanged.
  4. The following summerises Scaling when the Object is represented by their Coordinate Points:
    Scaling TypeEquation FormMatrix Form
    Scaling in 2D \(x' = k_x \times x\)
    \(y' = k_y \times y \)
    \(\begin{bmatrix} k_x & 0 \\0 & k_y \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} x' \\ y' \end{bmatrix}\)
    Scaling in 3D \(x' = k_x \times x\)
    \(y' = k_y \times y \)
    \(z' = k_z \times z \)
    \(\begin{bmatrix} k_x & 0 & 0 \\0 & k_y & 0\\0 & 0 & k_z\end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} x' \\ y' \\ z' \end{bmatrix}\)
  5. When an Object is represented by an Equation, the New Equation can be found out by dividing by the Scale Factors. For example let us take the object represented by following equation:
    1. \( (x-5)^2 + (y-3)^2 = 25 \)
    On expanding the object by (2,2) (i.e. dividing by scale factor \((2,2)\)) the new equation shall become
    1. \(\Rightarrow (\frac{x}{2} -5)^2 + (\frac{y}{2}-3)^2 = 25 \)
      \(\Rightarrow (x-10)^2 + (y-6)^2 = 100 \)
    Now lets consider the object represented by following equation:
    1. \( (x-10)^2 + (y-6)^2 = 100 \)
    On shrinking the object by (2,2) (i.e. dividing by scale factor \((\frac{1}{2},\frac{1}{2})\)) the new equation shall become
    1. \(\Rightarrow (2x -10)^2 + (2y-6)^2 = 25 \)
      \(\Rightarrow (x-5)^2 + (y-3)^2 = 25 \)
  6. Scaling transformation may cause Unwanted Translation. To prevent it from occurring the object to be scaled must be anchored to a point. Following are the steps involved in scaling an object anchored to a particular point \((o_x,o_y)\) (or \((o_x,o_y,o_z)\) in 3D).
    1. Shift the origin to point \((o_x,o_y)\) (or \((o_x,o_y,o_z)\) in 3D)
    2. Perform the required scaling
    3. Undo Shifting the origin i.e shift the origin back to point \((0,0)\) (or \((0,0,0)\) in 3D)
  7. The following gives the derivation of 2D Anchored Scaling matrix:
    Derivation TypeDerivation
    Matrix Multiplication \(\begin{bmatrix} 1 & 0 & o_x \\ 0 & 1 & o_y \\0 & 0 & 1\end{bmatrix} \begin{bmatrix} k_x & 0 & 0 \\ 0 & k_y & 0 \\0 & 0 & 1 \end{bmatrix} \begin{bmatrix} 1 & 0 & -o_x \\ 0 & 1 & -o_y \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} x \\ y \\ 1 \end{bmatrix} = \begin{bmatrix} k_x & 0 & -k_x \times o_x + o_x\\0 & k_y & -k_y \times o_y + o_y\\0 & 0 & 1\end{bmatrix} \begin{bmatrix} x \\ y \\ 1 \end{bmatrix} \)
    Equation \(x' = (k_x \times x) - (k_x \times o_x) + o_x\)
    \(y' = (k_y \times y) - (k_y \times o_y) + o_y\)
  8. The following gives the derivation of 3D Anchored Scaling matrix:
    Derivation TypeDerivation
    Matrix Multiplication \(\begin{bmatrix} 1 & 0 & 0 & o_x \\ 0 & 1 & 0 & o_y \\0 & 0 & 1 & o_z \\0 & 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} k_x & 0 & 0 & 0 \\ 0 & k_y & 0 & 0 \\0 & 0 & k_z & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} 1 & 0 & 0 & -o_x \\ 0 & 1 & 0 & -o_y \\ 0 & 0 & 1 & -o_z \\ 0 & 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \\ 1 \end{bmatrix} = \begin{bmatrix} k_x & 0 & 0 & -k_x \times o_x + o_x\\0 & k_y & 0 & -k_y \times o_y + o_y\\0 & 0 & k_z & -k_z \times o_z + o_z\\0 & 0 & 0 & 1\end{bmatrix} \begin{bmatrix} x \\ y \\ z \\ 1 \end{bmatrix} \)
    Equation \(x' = (k_x \times x) - (k_x \times o_x) + o_x\)
    \(y' = (k_y \times y) - (k_y \times o_y) + o_y\)
    \(z' = (k_z \times z) - (k_z \times o_z) + o_z\)
© Invincible IDeAS. All Rights Reserved