问题描述:
三维空间内,给定一个矩形平面,矩形中心点不变进行旋转,已知面旋转前后的法向,和四个点的坐标,求旋转后的四点坐标。
三维旋转矩阵见维基百科
所围绕的单位向量r = (x,y,z)意思是一个向量的旋转总是要围绕着一个轴旋转,已知旋转中心不是一个轴,这个轴可以是坐标轴,或者单位向量r
问题中单位向量的求法:旋转前后的法向叉乘,结果单位化即可
在运算于向量r上的时候,这等价于Rodrigues旋转公式:
回到问题解答,旋转前点的坐标A,矩形中心点坐标O,构成vector(O,A),vector即上面的r。