四元数和归一化 [英] Quaternion and normalization

查看:424
本文介绍了四元数和归一化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道如果我想旋转一个向量,需要对四元数进行归一化.

I know that quaternions need to be normalized if I want to rotate a vector.

但是有什么理由不自动规范化四元数吗?如果有,哪些四元数运算会导致非标准化四元数?

But are there any reasons to not automatically normalize a quaternion? And if there are, what quaternion operations do result in non-normalized quaternions?

  • 两个四元数相乘?
  • 点积?

对不起,如果这个问题有点模糊.我仍在尝试围绕四元数.

Sorry, if this question is a little bit fuzzy. I'm still trying wrap my head around quaternions.

推荐答案

任何产生四元数的操作都需要归一化,因为浮点进动错误会导致它不是单位长度.

Any operation that produces a quaternion will need to be normalized because floating-point precession errors will cause it to not be unit length.

出于性能原因,我建议不要使用标准例程自动执行规范化.任何有能力的程序员都应该意识到精度问题,并能够在必要时对数量进行归一化 - 而且并不总是需要单位长度的四元数.

I would advise against standard routines performing normalization automatically for performance reasons. Any competent programmer should be aware of the precision issues and be able to normalize the quantities when necessary - and it is not always necessary to have a unit length quaternion.

向量运算也是如此.

这篇关于四元数和归一化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆