0
$\begingroup$

I am attempting to export a transformation matrix from the API of a design program. The matrix looks fine and it is workable apart from 1 issue where the scaling factor is inverse. This means when you scale down a shape it results in a scaling factor > 1 and vice versa.

For example, following matrix \begin{bmatrix}2&0\\0&2\end{bmatrix} Results in the shape being twice as small.

Now I am trying to use this matrix and apply it somewhere else, but because of the inverse scale I am unable to use it. Is there any way to normalize the scaling factor of a affine transformation matrix?

One last thing to note is the fact that the rotation applied, according to documentation is also reversed from standard formulas. Their rotation matrix would look something like this: \begin{bmatrix}cos&sin\\-sin&cos\end{bmatrix}

$\endgroup$
2
  • 1
    $\begingroup$ Can you just invert the matrix? $\endgroup$
    – Hume2
    May 15 '20 at 11:39
  • $\begingroup$ @Hume2 ugh you were right, inverse matrix worked fine.You post it as answer if you want. $\endgroup$ May 16 '20 at 7:12
0
$\begingroup$

Usually, we use a matrix to transform a shape from one coordinates to another coordinates. However, here we are asked to provide a backwards transformation which means that we have to provide the inverted matrix. So the sollution is just that you take the matrix which you would use if the scaling wasn't inverted and you invert the matrix.

When the matrix is diagonal (your first example), the inverse matrix is also diagonal, only the elements on the diagonal are inverted.

When the matrix is unitary (your second example), it holds that $A^{-1}=A^T$. All rotation matrices are unitary and in the case of 2D rotation matrices, it's clear that the inverse has to be the backwards rotation.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.