I'm attempting to figure out how to rotate a 2D object along any axis, which could be outside of the shape itself or somewhere else.
Any pseudocode will do; I just happen to use the VBA programming language for this.
I am looking for a function similar to this:
function rotate(obj, axisX, axisY, angle)
obj.x = ?
obj.y = ?
I'm not sure if it matters, but let's suppose it does for the sake of simplicity that the shape is a rectangle.
And when the shape has been rotated, the x, y coordinates would be those of a square containing the rotated shape.