在 3D 空间中旋转 - x、y、z 旋转的随机值,因此最终结果 = 开始
谁能告诉我确定 x,y,z 旋转值的组合将给出与 3d 空间中标准化对象(无旋转)相同的结果的公式?
Can anyone tell me the formula for determining what combination of x,y,z rotation values will give the same result as a normalized object(no rotation) in 3d space?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您知道最终结果和初始状态,那么这只是基本的矩阵乘法。你必须找到用于旋转对象的角度(一个用于 x 轴、y 轴和 z 轴)并将你的坐标向量左乘于这个家伙:
If you know both the end result and the initial state, then it's just basic matrix multiplication. You'd have to find the angles used to rotate the object (one for the x-axis, y-axis and z-axis) and left-multiply your coordinate vectors by this guy:
选择均匀分布的随机角度[-pi, pi]不会导致球体上均匀随机的旋转轴!维基百科对这种现象有一个很好的解释,称为“万向节锁”。请参阅 James Arvo 的“快速随机旋转矩阵”,了解一种产生均匀随机旋转的算法。
Choosing uniformly distributed random angles [-pi, pi] will not lead to a uniformly random rotation axis on the sphere! Wikipedia has a nice explanation about this phenomenon, which is called the "gimbal lock". See "Fast Random Rotation Matrices" by James Arvo for one algorithm that produces uniformly random rotations.