“平均"四元数? [英] "Average" of multiple quaternions?

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

问题描述

我正在尝试在OpenGL程序中将矩阵动画从矩阵转换为四元数,但是遇到了一个问题:

I'm trying to make the switch from matrices to quaternions for skeletal animation in my OpenGL program, but I've encountered a problem:

给定多个单位四元数,我需要得到一个四元数,当用于转换向量时,该四元数将给出一个向量,该向量是每个四元数分别转换后的向量的平均值. (对于矩阵,我只需将矩阵加在一起并除以矩阵数即可)

Given a number of unit quaternions, I need to get a quaternion that when used to transform a vector will give a vector that is the average of the vector transformed by each quaternion individually. (with matrices I would simply add the matrices together and divide by the number of matrices)

推荐答案

我尝试按照建议

I tried Slerping the quaternions as suggested here but that didn't work for what I'm trying to do (model was distorted), so I simply ended up transforming the vectors by each quaternion and then doing an average (until I can find a better solution).

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

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