利用三维旋转矩阵在空间中旋转平面

问题描述:

三维空间内,给定一个矩形平面,矩形中心点不变进行旋转,已知面旋转前后的法向,和四个点的坐标,求旋转后的四点坐标。 


三维旋转矩阵见维基百科 

 \mathcal{M}(\hat{\mathbf{v}},\theta) = \begin{bmatrix}   \cos \theta + (1 - \cos \theta) x^2 & (1 - \cos \theta) x y - (\sin \theta) z  & (1 - \cos \theta) x z + (\sin \theta) y  \\   (1 - \cos \theta) y x + (\sin \theta) z  & \cos \theta + (1 - \cos \theta) y^2 & (1 - \cos \theta) y z - (\sin \theta) x\\   (1 - \cos \theta) z x - (\sin \theta) y & (1 - \cos \theta) z y + (\sin \theta) x & \cos \theta + (1 - \cos \theta) z^2 \end{bmatrix}

所围绕的单位向量r = (x,y,z)意思是一个向量的旋转总是要围绕着一个轴旋转,已知旋转中心不是一个轴,这个轴可以是坐标轴,或者单位向量r

问题中单位向量的求法:旋转前后的法向叉乘,结果单位化即可

在运算于向量r上的时候,这等价于Rodrigues旋转公式

\mathcal{M} \cdot \mathbf{r} = \mathbf{r} \,\cos(\theta)+\hat{\mathbf{v}}\times \mathbf{r}\, \sin(\theta)+(\hat{\mathbf{v}}\cdot\mathbf{r})\hat{\mathbf{v}}(1-\cos(\theta))


回到问题解答,旋转前点的坐标A,矩形中心点坐标O,构成vector(O,A),vector即上面的r。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值