How to transform a rotation matrix so it rotates from on its right corner vertex rather than its left corner vertx

695 Views Asked by At

I am trying to figure out what rotation matrix will allow me to rotate a picture in 2d from its right corner point.

Below you can see an image, on the left the picture is rotating from its left corner vertex and on the right it rotates on its right corner vertex.

enter image description here

What do i plug into the rotation matrix in order to get this to happen?

$$ R(\theta)=\left[ \begin{array}{} \cos \theta&-\sin\theta\\ \sin\theta&\cos\theta \end{array} \right] $$

I have tried to use rotation then mirroring and all other such variations, but none of them satisfy the question, as for the picture on the right, the house starts with its left corner point at (2,2)

1

There are 1 best solutions below

0
On BEST ANSWER

To rotate the plane about any given point:

  1. Translate the plane so that the point moves to the origin
  2. Rotate the plane about the origin
  3. Translate the plane so that the origin moves back to the given point

The translations in 1 and 3 are inverses of each other.

In terms of complex numbers, you could use the map

$$f_{w,\theta}(z)=w +e^{i\theta}(z-w)$$

Here $w$ is the center of rotation and $\theta$ is the angle of rotation in radians measured counterclockwise.

You should be able to convert this to matrix notation.