How can I get the get upper-left, upper-right, lower-left and lower-right corners given XY coordinates from a rectangle shape when I have the following data available to me?
positionX
positionY
width
height
rotation
Is there an easy way of doing this?
Clarification:
The rectangle is being rotated at positionX and positionY, the upper-left corner when no rotation is applied (rotation=0).
First, let me take these smaller notifications:
Since we are rotating the complete geometry about point $(x,y)$ by an angle of $\theta$, we'll have new points given as:
which, on simplification give us the co-ordinates
I am not entirely sure of the conversion I did for $\sin(\frac{3\pi}{2}±\theta)$ or $\cos(\frac{3\pi}{2}±\theta)$