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

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
- Consider the midpoint (Bresenham) algorithm for rasterizing lines: (1) Input (x₁, y₁) and (x₂, y₂) (2) y = y₁ (3) d = f(x₁ + 1, y₁ + 1/2) /…
- In 3D Graphics, which of the following statements about perspective and parallel projection is/are true? P : In a perspective projection, t…
- In 3D Graphics, which of the following statements is/are true? P : Back-face culling is an example of an image- precision visible-surface d…
- Consider the two C++ programs P1 and P2 shown below and two statements about them: S1: P1 prints out 3 S2: P2 prints out 4:2 What can you s…
- Consider the following recursive Java function f that takes two long arguments and returns a float value : public static float f(long m, lo…
- What does the following Java function perform? (Assume int occupies four bytes of storage) public static int f( int a) { // Pre-conditions…