How to take the spatial derivative of quaternions

  • Context: Graduate 
  • Thread starter Thread starter FQVBSina_Jesse
  • Start date Start date
  • Tags Tags
    Derivative Quaternion
Click For Summary
SUMMARY

The discussion focuses on the spatial derivative of quaternions, specifically how to derive a functional form of a quaternion field q(x,y,z) from a 5x5x5 grid of points. The user seeks to apply trilinear interpolation to each component of the quaternion and is concerned about the treatment of the quaternion's real and geometric parts during differentiation. The conversation highlights the necessity of treating quaternion components independently and confirms that each component can be interpolated as a scalar field, ultimately allowing for valid quaternion representation at any point within the interpolated bounds.

PREREQUISITES
  • Understanding of quaternion mathematics and their properties
  • Familiarity with trilinear interpolation techniques
  • Knowledge of spatial derivatives, including curl and gradient
  • Basic concepts of matrix representation of quaternions
NEXT STEPS
  • Research "Quaternion interpolation methods" for practical applications
  • Explore "Trilinear interpolation in 3D fields" for implementation techniques
  • Study "Spatial derivatives of quaternion fields" for advanced mathematical insights
  • Learn about "Quaternion representation as rotation matrices" for better understanding of transformations
USEFUL FOR

Mathematicians, computer graphics developers, and physicists interested in quaternion applications in 3D space, particularly those working with spatial derivatives and interpolation techniques.

FQVBSina_Jesse
Messages
54
Reaction score
9
TL;DR
Time derivative of quaternions can be easily found but I could not find any document on taking spatial derivative of quaternions, such as taking a curl of quaternions.
I have a 5x5x5 set of grid points in space. I can describe each point with p(x,y,z), and I can convert them to spherical or other coordinates. At each point, I have a quaternion assigned to it. So, numerically, I can describe a q(x,y,z) quaternion field. The goal is to obtain a functional form of the quaternion field, i.e. q(x,y,z) = Ax + By + Cz + Ax^2 + ... such that I can get the quaternion at any point given the coordinates. Then, I would be able to take a spatial derivative of it.

If I am dealing with a simple scalar, I can use the trilinear interpolation, described very well on Wikipedia. Then with a function f(x,y,z), I can take the spatial derivative of it to obtain quantities like curl and gradient. Even though many sources describe quaternions as just complex numbers, I feel like they carry more information than just numbers, and whether I can treat each part of the quaternion independently when taking spatial derivatives is unclear. Furthermore, if I just treat the quaternion like a number with a real part and 3 geometric parts, the real part of the quaternion is immediately gone upon taking any derivative, and that feels incorrect to me.

Does anyone have any extended reading on this topic, or have done it before and can give me some pointers?

Thanks in advance!

Jesse
 
Physics news on Phys.org
FQVBSina_Jesse said:
TL;DR Summary: Time derivative of quaternions can be easily found but I could not find any document on taking spatial derivative of quaternions, such as taking a curl of quaternions.

I have a 5x5x5 set of grid points in space. I can describe each point with p(x,y,z), and I can convert them to spherical or other coordinates. At each point, I have a quaternion assigned to it. So, numerically, I can describe a q(x,y,z) quaternion field. The goal is to obtain a functional form of the quaternion field, i.e. q(x,y,z) = Ax + By + Cz + Ax^2 + ... such that I can get the quaternion at any point given the coordinates. Then, I would be able to take a spatial derivative of it.

If I am dealing with a simple scalar, I can use the trilinear interpolation, described very well on Wikipedia. Then with a function f(x,y,z), I can take the spatial derivative of it to obtain quantities like curl and gradient. Even though many sources describe quaternions as just complex numbers, I feel like they carry more information than just numbers, and whether I can treat each part of the quaternion independently when taking spatial derivatives is unclear. Furthermore, if I just treat the quaternion like a number with a real part and 3 geometric parts, the real part of the quaternion is immediately gone upon taking any derivative, and that feels incorrect to me.

Does anyone have any extended reading on this topic, or have done it before and can give me some pointers?

Thanks in advance!

Jesse

The concept starts with the Weierstraß formulation of differentiability. The dates of the references on Wikipedia, however, do not suggest that this was a successful concept after all.
 
FQVBSina_Jesse said:
Furthermore, if I just treat the quaternion like a number with a real part and 3 geometric parts, the real part of the quaternion is immediately gone upon taking any derivative, and that feels incorrect to me.
I don't follow this statement, nor do I see your difficulty with spatial interpolation. In terms of the 4 quaternionic basis elements ##\left\{ 1,\vec{e}\right\} ##, where ##\vec{e}\equiv\left(\mathbf{i},\mathbf{j},\mathbf{k}\right)^{T}##, your quaternion field can be written ##q\left(x,y,z\right)=\psi_{0}\left(x,y,z\right)+\vec{\psi}\left(x,y,z\right)\cdot\vec{e}## using the 4 component fields ##\left\{ \psi_{0},\vec{\psi}\right\} \equiv\left\{ \psi_{0},\psi_{i},\psi_{j},\psi_{k}\right\}##. Now just interpolate each component ##\psi_n## as if it were a scalar field.
 
fresh_42 said:
The concept starts with the Weierstraß formulation of differentiability. The dates of the references on Wikipedia, however, do not suggest that this was a successful concept after all.
Thanks for sharing! However, as I read it, I feel like it is more about expressing normal function values in terms of quaternions, which was a thing when quaternions were introduced. It was why we still sometimes see i j k for x y z in vectors.
 
renormalize said:
I don't follow this statement, nor do I see your difficulty with spatial interpolation. In terms of the 4 quaternionic basis elements ##\left\{ 1,\vec{e}\right\} ##, where ##\vec{e}\equiv\left(\mathbf{i},\mathbf{j},\mathbf{k}\right)^{T}##, your quaternion field can be written ##q\left(x,y,z\right)=\psi_{0}\left(x,y,z\right)+\vec{\psi}\left(x,y,z\right)\cdot\vec{e}## using the 4 component fields ##\left\{ \psi_{0},\vec{\psi}\right\} \equiv\left\{ \psi_{0},\psi_{i},\psi_{j},\psi_{k}\right\}##. Now just interpolate each component ##\psi_n## as if it were a scalar field.
The difficulty for me is that I am not as familiar with forms of rotation. What's the rationale that each component can be treated as an independent scalar field? From here, if I express the quaternions as rotation matrices, can each component of the 3x3 rotation matrix also be interpolated independently?
 
FQVBSina_Jesse said:
Thanks for sharing! However, as I read it, I feel like it is more about expressing normal function values in terms of quaternions, which was a thing when quaternions were introduced. It was why we still sometimes see i j k for x y z in vectors.
Well, you asked this question in a mathematics forum. The quaternions are simply a complex, skew division algebra from the mathematical point of view. And skew is the problem here. Time and space are irrelevant.
 
FQVBSina_Jesse said:
The difficulty for me is that I am not as familiar with forms of rotation. What's the rationale that each component can be treated as an independent scalar field? From here, if I express the quaternions as rotation matrices, can each component of the 3x3 rotation matrix also be interpolated independently?
Yes, each component can be interpolated independently. Another way to see this is to use a realization of the 4 quaternion bases written explicitly as 2x2 matrices:$$
I=\left(\begin{array}{cc}
1 & 0\\
0 & 1
\end{array}\right),\mathbf{\:i}=\left(\begin{array}{cc}
0 & i\\
i & 0
\end{array}\right),\:\mathbf{j}=\left(\begin{array}{cc}
0 & 1\\
-1 & 0
\end{array}\right),\:\mathbf{k}=\left(\begin{array}{cc}
-i & 0\\
0 & i
\end{array}\right)
$$Then all the algebraic properties of products of quaternions are a simple consequence of ordinary matrix multiplication. In this realization, your quaternion field is just the complex matrix:$$
q\left(\vec{x}\right)=\left(\begin{array}{cc}
\psi_{0}\left(\vec{x}\right)-i\psi_{k}\left(\vec{x}\right) & i\psi_{i}\left(\vec{x}\right)+\psi_{j}\left(\vec{x}\right)\\
i\psi_{i}\left(\vec{x}\right)-\psi_{j}\left(\vec{x}\right) & \psi_{0}\left(\vec{x}\right)+i\psi_{k}\left(\vec{x}\right)
\end{array}\right)
$$and you may freely differentiate or interpolate the individual ##\psi## components.
 
renormalize said:
Yes, each component can be interpolated independently. Another way to see this is to use a realization of the 4 quaternion bases written explicitly as 2x2 matrices:$$
I=\left(\begin{array}{cc}
1 & 0\\
0 & 1
\end{array}\right),\mathbf{\:i}=\left(\begin{array}{cc}
0 & i\\
i & 0
\end{array}\right),\:\mathbf{j}=\left(\begin{array}{cc}
0 & 1\\
-1 & 0
\end{array}\right),\:\mathbf{k}=\left(\begin{array}{cc}
-i & 0\\
0 & i
\end{array}\right)
$$Then all the algebraic properties of products of quaternions are a simple consequence of ordinary matrix multiplication. In this realization, your quaternion field is just the complex matrix:$$
q\left(\vec{x}\right)=\left(\begin{array}{cc}
\psi_{0}\left(\vec{x}\right)-i\psi_{k}\left(\vec{x}\right) & i\psi_{i}\left(\vec{x}\right)+\psi_{j}\left(\vec{x}\right)\\
i\psi_{i}\left(\vec{x}\right)-\psi_{j}\left(\vec{x}\right) & \psi_{0}\left(\vec{x}\right)+i\psi_{k}\left(\vec{x}\right)
\end{array}\right)
$$and you may freely differentiate or interpolate the individual ##\psi## components.
Thanks a lot! That makes sense.

Just to circle this back to the task at hand that sparked my question, if I apply trilinear interpolation for each component of the quaternion or rotation matrix, and the resulting matrix of functions gives a quaternion or rotation matrix given any arbitrary point within the interpolated bounds?
 
FQVBSina_Jesse said:
Just to circle this back to the task at hand that sparked my question, if I apply trilinear interpolation for each component of the quaternion or rotation matrix, and the resulting matrix of functions gives a quaternion or rotation matrix given any arbitrary point within the interpolated bounds?
Yes, the matrix ##q## represents a valid quaternion for any arbitrary choice of the 4 (real) functions ##\psi_n##.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 10 ·
Replies
10
Views
9K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 24 ·
Replies
24
Views
21K