图像坐标系:x向右增大, y向下增大。
点A在图像中的坐标(x1, y1)
点B在图像中的坐标(x2, y2)
点B绕着点A逆时针旋转a弧度,旋转后的点B坐标为{x = (x2 - x1)*cos(a) + (y2 - y1)*sin(a) + x1, y = -(x2 - x1)*sin(a) + (y2 - y1)*cos(a) + y1}
点B绕着点A逆时针旋转a弧度,再平移后。点A的坐标为(x3, y3),那么旋转平移后的点B坐标为{x = (x2 - x1)*cos(a) + (y2 - y1)*sin(a) + x3, y = -(x2 - x1)*sin(a) + (y2 - y1)*cos(a) + y3}
推理过程: