You can use a rotation matrix.
Suppose you have a point P(x,y). Let the image point be B(x`,y`) after a rotation of radians. The coordinates of the image point can be found by matrix multiplication:
I'm trying to work on rotating a rectangle for some computer code. I know the top left and right co-ordinates and the rectangle size, but I'm trying to figure out how I'd determine the relative co-ordinates of the bottom points that would be joined to create the rectangle. Is there a formula for this?
I haven't done maths in a while so please excuse me if this is straightforward!