Finding the Angle Between Two Quaternions: A Simple Solution?

  • Context: Graduate 
  • Thread starter Thread starter Fidelis
  • Start date Start date
  • Tags Tags
    Angle Quaternions
Click For Summary

Discussion Overview

The discussion revolves around finding a simple expression for the angle between two quaternions represented in angle-phase form. Participants explore the mathematical relationships and challenges involved in expressing this angle in terms of the differences in their phase angles.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant seeks to express the angle between two quaternions in terms of their phase angles, specifically \(\phi - \phi'\), \(\psi - \psi'\), and \(\theta - \theta'\).
  • Another participant suggests using the dot product to find the angle, referencing a resource that discusses calculating angles between quaternions.
  • A participant notes that the inner product approach would be more straightforward if the quaternions were in Cartesian form, but expresses difficulty in converting from phase-angle form.
  • One reply questions the simplicity of finding such an expression and suggests that the phase-angle form may relate to spherical coordinates.
  • Another participant clarifies that the angle used in quaternion calculations may require additional considerations, such as needing a rotation angle for each quaternion.
  • References to external resources and code snippets are provided to assist in understanding quaternion relationships and calculations.

Areas of Agreement / Disagreement

Participants do not reach a consensus on a simple solution for expressing the angle between the quaternions. There are multiple competing views and approaches discussed, with some uncertainty regarding the necessary transformations and calculations.

Contextual Notes

Some limitations include the dependence on the definitions of angle-phase form and the challenges in converting to Cartesian coordinates. The discussion also highlights the need for additional parameters, such as rotation angles, which are not fully resolved.

Fidelis
Messages
2
Reaction score
0
Hello!

I have two quaternions with norm equal to 1. Both are represented in the angle-phase form, i.e, I have q=exp(i*\phi)exp(k*\psi)exp(j*\theta) and p=exp(i*\phi')exp(k*\psi')exp(j*\theta'). Let \alpha be the angle between q and p. I need to write \alpha in function of \phi-\phi', \psi-\psi' and \theta-\theta' in a simple way. Could anyone give me some idea?
 
Last edited by a moderator:
Mathematics news on Phys.org
In any vector space, ##A\cdot B = |A||B|cos(\theta)## with theta the angle between two vectors and ##\cdot## the inner product.
A quick google search gives this:
https://www.researchgate.net/post/How_do_I_calculate_the_smallest_angle_between_two_quaternions
Which says use the dot product.
 
Last edited by a moderator:
The "inner product" would be good for me if p and q were in Cartesian form. My problem is that I need to write \alpha in function of \phi-\phi', \psi-\psi' and \theta-\theta' in a simple way. The quartenions q and p are in the phase-angle form and I can not convert the quaternions to the Cartesian form. This is my challenge!

Thanks
 
I assume by Angle-Phase-Form you mean the polar decomposition as in here:
https://en.wikipedia.org/w/index.ph...5732179#Exponential.2C_logarithm.2C_and_power

You still need an rotation angle for each quaternion (you only gave 3 components, but you need still need the angle).
Be aware that the actual rotation angle is 2 \cdot \theta!

----

I don't have a good answer, but what you need is related to the angle used in a Quaternion Slerp
http://www.geometrictools.com/Documentation/Quaternions.pdf
You might find "2. Relationship of Quaternions to Rotations" useful in that document.

Here is some code by James McEnnan I use in my own project to get the angle and the eigen-axis (rotation axis) between two quaternions, see function getang here:
https://sourceforge.net/p/qspline-cc0/code/1/tree/qspline/trunk/qspline.c#l378
Be aware that in this code [0],[1],[2] are the vector parts of the quaternions and [3] is the scalar part.

I know this is not the form you have, but maybe it will be of some use to you.
 
Last edited by a moderator:

Similar threads

  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 15 ·
Replies
15
Views
1K
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
1
Views
1K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
2
Views
2K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 15 ·
Replies
15
Views
2K