How to take the spatial derivative of quaternions

  • #1
FQVBSina_Jesse
14
1
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
 
Physics news on Phys.org
  • #2
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.
 
  • #3
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.
 
  • #4
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.
 
  • #5
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?
 
  • #6
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.
 
  • #7
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.
 
  • #8
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?
 
  • #9
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

  • Advanced Physics Homework Help
Replies
1
Views
711
Replies
6
Views
2K
Replies
5
Views
1K
Replies
1
Views
493
Replies
12
Views
2K
Replies
4
Views
3K
Replies
10
Views
7K
  • Classical Physics
Replies
6
Views
795
Back
Top