I have a line with points A(1,2,1) and B(3,4,1). What would be the coordinates of the A and B if:
- midpoint of the line is translated to origin
- rotating line for 45 degrees
- scaling the line in y direction by 2
- translating the midpoint back to original position
After I get midpoint(2,3,1) and transformation Matrices and multiply them in reverse order I get transformation matrix as (took cos45 and sin45 as 0.7)
$$ \begin{matrix} 0.7 & -0.7 & 2.7 \\ 1.4 & 1.4 & -4 \\ 0 & 0 & 1 \\ \end{matrix} $$
then I multiplied this matrix by A(1,2,1) and B(3,4,1) and I get that new coordinates of A'(2,0.2,1) and B'(2,5.8,1). However, in available answers in test there is no such answer. The closest to what I got is that A'(0.2,2,1) and B'(5.8,2,1). Can it be that question mixed x and y coordinates or I did a mistake somewhere? Here are my defined matrices which I multiplied in a reverse order:
$$ \begin{matrix} 1 & 0 & -2 \\ 0 & 1 & -3 \\ 0 & 0 & 1 \\ \end{matrix} $$
$$ \begin{matrix} 0.7 & -0.7 & 0 \\ 0.7 & 0.7 & 0 \\ 0 & 0 & 1 \\ \end{matrix} $$
$$ \begin{matrix} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 1 \\ \end{matrix} $$
$$ \begin{matrix} 1 & 0 & 2 \\ 0 & 1 & 3 \\ 0 & 0 & 1 \\ \end{matrix} $$