What is the transformation matrix that transforms the square with vertices (1, 1), (−1, 1), (−1, −1), (1, −1) into the parallelogram with corresponding vertices (2, 1), (0, 1), (−2, −1), (0, −1)?
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: A. M = [1 1 0; 0 1 0; 0 0 1]
Explanation
Each point maps (x, y) → (x + y, y): (1,1) → (2,1), (−1,1) → (0,1), (−1,−1) → (−2,−1), (1,−1) → (0,−1). That is the x-shear matrix with 1 in the top-middle entry.
More Programming Languages and Computer Graphics questions
- A Bezier curve P(t) is defined by four control points P0 = (−2, 0), P1 = (−2, 4), P2 = (2, 4), P3 = (2, 0). Which statements are correct? A…
- Given below are two statements Statement I: The maximum number of sides that a triangle might have when clipped to a rectangular viewport i…
- With 1-byte chars, 2-byte shorts, 4-byte ints and 8-byte doubles, each aligned to its size, no field reordering, and padding for alignment,…
- Consider the Java function: public static float f(long m, long n) { float result = (float)m / (float)n; if (m < 0 || n < 0) return 0.0f; el…
- In the context of 3D Computer graphics, which of the following statements is/are correct? (A) Under perspective projection, each set of par…
- Concerning phong shading and Gouraud shading in a 3D scene, which of the following statements are true? (A) Gouraud shading requires more c…