Question

Consider the following transformation matrix for distortion in a 2D space.

  [1 a 0]
M=[b 1 0]
  [0 0 1]

Is it possible to obtain the same transformation by combinating a rotation and a scale?

Was it helpful?

Solution

Not really. It only works if b = -a, which isn't "distortion"; it's just a rotation and a scale of magnitude 1/cos(theta).

[1/cos   0  ] [ cos  sin] = [   1     sin/cos]
[  0   1/cos] [-sin  cos]   [-sin/cos    1   ]

[cos  sin][1/cos   0  ] = [   1     sin/cos]
[-sin cos][  0   1/cos]   [-sin/cos    1   ]

a is the tangent of theta.

OTHER TIPS

A transformation matrix allows for both a scaling and a rotation to be applied at the same time.

    [   cos(theta),  a sin(theta)]    
    [-b sin(theta),    cos(theta)]

The rotation and scale matrix is just modifying the vectors that define an object and how it is drawn.

I am however confused by what you mean exactly. For the above matrix to be equal to:

    [1 a]
    [b 1]

Theta must be 0 (cos(0) = 1), and if it is 0, then a and b are also equal to zero, and the whole thing just becomes the identity matrix.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top