208k views
3 votes
Consider a unit square S with vertices A= (0,0),B=(0,1),C=(1,1) and D=(1,0). For each question below write the corresponding matrix and show the result of applying this matrix to the original square S by writing oout the new vertices A' ,B',C'and D'. Use the subplots in Python/R

1. M₁ - expand x by a factor of 1.5
2. M₂ - contract y by a factor of 0.75
3. M₃ - shear along x by a factor of 2
4. M₄ - shear along y by a factor of 1.25
5. M₅ - counterclockwise rotation by π/4
6. M₆ - clockwise rotation by π/6.

1 Answer

5 votes

Final answer:

Transformations applied to a unit square can be represented as matrices that perform scaling, shearing, and rotation, altering the coordinates to produce new vertices for the transformed square.

Step-by-step explanation:

Transformations of a unit square can be done with various matrices, each performing a different operation such as scaling, rotating, and shearing. The matrices corresponding to each requested transformation are:

  1. Scaling in x by 1.5: M₁ = [[1.5, 0], [0, 1]]
  2. Scaling in y by 0.75: M₂ = [[1, 0], [0, 0.75]]
  3. Shearing in x by 2: M₃ = [[1, 2], [0, 1]]
  4. Shearing in y by 1.25: M₄ = [[1, 0], [1.25, 1]]
  5. Counterclockwise rotation by π/4: M₅ = [[cos(π/4), -sin(π/4)], [sin(π/4), cos(π/4)]]
  6. Clockwise rotation by π/6: M₆ = [[cos(-π/6), -sin(-π/6)], [sin(-π/6), cos(-π/6)]]

Applying these matrices to the vertices of the square S yields new vertices A', B', C', and D' for each transformation. The equations showing the coordinates after rotation are given by x' = x cos q + y sin q and y' = -x sin q + y cos q, which represent the rotated position of any point (x,y) in the square S.

User Timo Tijhof
by
8.4k points