help With rotating vectors

조회 수: 2 (최근 30일)
random1072
random1072 2020년 4월 21일
답변: James Tursa 2020년 5월 7일
trying to rotate my quaternion quat_1 about quatternion quat_2_new and find new position. Was curious how to do this.

답변 (1개)

James Tursa
James Tursa 2020년 5월 7일
We need more detail. Your quat_2_new is a unit quaternion, so it can be used for rotations. If your quat_1 is just supposed to be an arbitrary 3D vector expressed as a quaternion, then rotating quat_1 could be either of these two expressions
quat_1_rotated = inv(quat_2_new) * quat_1 * quat_2_new
or
quat_1_rotated = quat_2_new * quat_1 * inv(quat_2_new)
Where the * is a quaternion multiply. Which of these expressions applies in your situation depends on what these quaternions represent (vector rotation or coordinate transformation) and what the quaternion convention being used is.

카테고리

Help CenterFile Exchange에서 Quaternion Math에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by