1. 旋转轴To四元数
假设某个旋转是绕单位向量 n = [ n x , n y , n z ] n = [n_x, n_y, n_z] n=[nx,ny,nz]进行了角度为 θ \theta θ的旋转,那么这个旋转的四元数形式为:
q = [ c o s θ 2 , n x s i n θ 2 , n y s i n θ 2 , n z s i n θ 2 ] q=[cos\frac{\theta}{2}, n_xsin\frac{\theta}{2}, n_ysin\frac{\theta}{2},n_zsin\frac{\theta}{2}] q=[cos2θ,nxsin2