Remember this picture, for rotating about the ORIGIN first.
A. To rotate 90° counter-clockwise about the ORIGIN, swap the coordinates
and change the sign of the NEW FIRST coordinate.
B. To rotate 180° about the ORIGIN, just change the signs of both
coordinates.
[Do not swap the coordinates].
[Clockwise and counter-clockwise are the same for 180°. ].
C. To rotate 90° clockwise about the ORIGIN, swap the coordinates
and change the sign of the NEW SECOND coordinate.
We only want to do B.
To translate about a centered point.
Translating the centered point to the origin (0,0) requires subtracting both
coordinates from themselves. So we translate the point to be rotated by
subtracting the coordinates of the centered point from the coordinates of
the point to be rotated.
We are to rotate (7,1) 90° counterclockwise about the centered point (3,2).
So first we translate the centered point (3,2) to (0,0) and the point to
be rotated (7,1) to the point (7-3,1-2) or (4,-1).
Then we rotate (4,-1) 90° counter-clockwise by swapping the coordinates and
changing the sign of the NEW FIRST coordinate. That gives us (1,4).
Then we translate (1,4) back by adding the coordinates of the original
centered point. (1+3,4+2) getting (4,6).
Answer: (4,6)
Here is what we did:
----------------
For rotating a general point (x,y) about (3,2) counter-clockwise 90°:
1. Subtract the coordinates of the center, getting (x-3,y-2).
2. Swap the coordinates, (y-2,x-3), change the signs of both terms of the
NEW FIRST coordinate, making it (-y+2,x-3).
3. Add the coordinates of (3,2) getting (-y+2+3,x-3+2) or (-y+5,x-1).
Answer (-y+5,x-1)
As a check, when (x,y) = (7,1), then (-y+5,x-1) = (-1+5,7-1) = (4,6).
Edwin