什么是使用矩阵,欧拉角的利弊,以及四元数或旋转再presentation? [英] What are the pros and cons of using Matrices, Euler Angles, and or Quaternions for rotation representation?

查看:129
本文介绍了什么是使用矩阵,欧拉角的利弊,以及四元数或旋转再presentation?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

矩阵和欧拉角可以从万向锁遭受但什么是一些其他参数使用一个比其他?

Matrices and Euler angles can suffer from Gimbal lock but what are some other arguments for using one over the other?

你认为的DirectX看好?

What do you think DirectX favors?

您在每日C使用​​什么++ / C /的DirectX编程?

What do you use in daily C++/C/DirectX programming?

推荐答案

欧拉角只需要三个参数,而不是存储矩阵(或三个,但听起来过度)。当您应用了Euler旋转,但是,你可能会结束与三个矩阵乘法的东西等同于创建转换。如果只用一个矩阵,你可能不会招致如此昂贵的费用(取决于基体是如何构造的)。除了万向锁,还有用内插旋转矩阵重新presentations时,你需要小心取消的影响的问题。

Euler angles only require three parameters, as opposed to storing a matrix (or three, but that sounds excessive). When you apply the Euler rotation, however, you will possibly end up with something equivalent to three matrix multiplications to create the transformation. If you were only using a matrix, you might not incur such an expensive cost (depending on how the matrix was constructed). Besides Gimbal Lock, there is also a problem with cancellation effects when interpolating matrix representations of rotations that you need to be careful about.

您可能要考虑四元。它们需要存储的四个参数,所以它们不是很重。他们避免万向锁,并且可以插值呈现平稳旋转。有一件事,可以PTED作为四元一个缺点间$ P $的是,他们可能不是某些非常直观。矩阵变换和欧拉角有型侧倾偏航俯仰或旋precession章动的是pretty直观。四元数更类似于一些落脚点轴伸出这样或那样的单一旋转。

You might want to consider quaternions. They require four parameters of storage, so they are not very heavy. They avoid Gimbal lock and can be interpolated for rendering smooth rotations. One thing that can be interpreted as a downside for the quaternion is that they may not be very intuitive for some. Matrix transformations and Euler angles have a type of roll-yaw-pitch or spin-precession-nutation that is pretty intuitive. Quaternions are more akin to a single rotation about some end-result axis sticking out this or that way.

有可能在那里会有人preFER一种方法在其他情况下,所以这些都只是一些事情作出决定时需要考虑的。

There are probably cases where someone would prefer one method over the others, so these are just some things to consider when making a decision.

这篇关于什么是使用矩阵,欧拉角的利弊,以及四元数或旋转再presentation?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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