I want to rotate a 2D rectangle using a rotation matrix. After the rotation, I want the points (x, y) of the rectangle to be:
(625.49939, 632.40015) top left
(636.49939, 632.40015) top right
(636.49939, 672.40015) bottom right
(625.49939, 672.40015) bottom left
Before the rectangle is rotated, it appears 40 units wide and 11 units tall. After the rotation, it will appear 11 units wide and 40 units tall.
I know that I have to rotate it 90 degrees, but how can I find exactly where to place the rectangle before the rotation so that it ends up in my desired position?
- The rectangle starts in position ??? so that it appears 40 units wide and 11 units tall
- The rectangle will be rotated 90 degrees clockwise (at its center point).
- The rectangle ends with the coordinates listed above.
How do I find the starting coordinates?