All mock tests are FREE till 31 December — register to save your progress

Which homogeneous 2D matrix transforms the figure (a) on the left side to the figure (b) on the right ?

Figure

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: B. [0 −2 6; 1 0 1; 0 0 1]

Explanation

B maps (x, y) to (−2y + 6, x + 1). The apex (1, 3) goes to (0, 2), and the base corners (0,0), (2,0), (0,2), (2,2) go to (6,1), (6,3), (2,1), (2,3): the house lies on its side pointing left and is stretched 2× along its length, as in figure (b).

More Programming Languages and Computer Graphics questions