I am using the rotation to rotate a rectangle I have displaying on the screen by a degree of θ°. My rectangle matrix of vertices is:
Where the first column is the x values and the second column is the y values. I load my vertices like this: bottomLeft (2,4), topLeft (2,5), topRight (3,5), and finally bottomRight (3,4).
Next I multiply it against the rotation matrix:
Finally once the calculation is done, I get a new set of vertices:
This is great and all but a problem is here, it rotates around the center point of (0,0). I want it to rotate around my bottomLeft vertex (2,4) (the first vertex in my matrix for this rectangle). How do I go about doing this? What do I have to do to rotate it around my bottomLeft vertex (basically change the center point of (0,0) to (2,4) as my center)?