坐标变换矩阵

坐标变换矩阵


图1

图一
如图一所示:在由XYZ轴组成的空间坐标系中,假如存在一点(0,y,z)点。此时原点到(0,y,z)点的夹角为θ,设长度为r。对于点的表示可以为:
x=0;
y=r*cosθ;
z=r*sinθ;
当将坐标轴以X轴为中心旋转α角后,得到新的坐标系X'Y'Z'。如图二所示:

在这里插入图片描述

图二
此时原点到(0,y,z)点的夹角为θ-α。对于新坐标系X'Y'Z'中点(0,y,z)的新坐标为:
x' =0;
y' =r*cos(θ-α)
    =r*(cosθ*cosα+sinθ*sinα)
   =(r*cosθ)*cosα+(r*sinθ)*sinα
   =y*cosα+z*sinα
z' =r*sin(θ-α)
   =r*(sinθ*cosα-cosθ*sinα)
   =(r*sinθ)*cosα-(r*cosθ)*sinα
   =-y*sinα+z*cosα
综上:以矩阵的形式表示上面的变换即为:

[ x ′ y ′ z ′ ] = [ 1 0 0 0 c o s α s i n α 0 − s i n α c o s α ] [ x y z ] \begin{gathered} \begin{bmatrix} x' \\ y' \\ z' \end{bmatrix}= \begin{bmatrix} 1 & 0&0 \\0 & cosα&sinα \\0 & -sinα&cosα\end{bmatrix} \begin{bmatrix} x \\ y\\ z\end{bmatrix} \end{gathered} xyz=1000cosαsinα0sinαcosαxyz
即绕X轴旋转坐标轴α角后,变换矩阵为:
[ 1 0 0 0 c o s α s i n α 0 − s i n α c o s α ] \begin{gathered} \begin{bmatrix} 1 & 0&0 \\0 & cosα&sinα \\0 & -sinα&cosα\end{bmatrix} \end{gathered} 1000cosαsinα0sinαcosα


对于绕其他轴旋转后的变换矩阵同理:
沿Z轴旋转β后的变换矩阵为:

[ c o s β s i n β 0 − s i n β c o s β 0 0 0 1 ] \begin{gathered} \begin{bmatrix} cosβ&sinβ&0 \\-sinβ&cosβ&0 \\0 & 0&1\end{bmatrix} \end{gathered} cosβsinβ0sinβcosβ0001

沿Y轴旋转φ后的变换矩阵为:

[ c o s φ 0 − s i n φ 0 1 0 s i n φ 0 c o s φ ] \begin{gathered} \begin{bmatrix} cosφ&0&-sinφ \\0 &1& 0\\sinφ&0&cosφ \end{bmatrix} \end{gathered} cosφ0sinφ010sinφ0cosφ

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值