Message Boards Message Boards

1
|
2549 Views
|
11 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Point rotation in Quaternion?

Posted 1 year ago

I am a newbie investigating the migration from python(sympy) to Mathematica.

I have looked through the quaternion documentation and cannot find any functionality equivalent to inverse or point rotation (rotate_point in sympy).

I can't find any information on the web, what are you guys doing?

POSTED BY: A Kim
11 Replies
Posted 1 year ago

In an earlier post I wrote:

Note also that the standard package does not handle symbolic quaternions

Well, the standard package does handle symbolic input to some functions. NonCommutativeMultiply is one example. But several functions does not accept symbolic input. So it is better to say that symbolic support is limited.

POSTED BY: Hans Milton
Posted 1 year ago

That makes sense.

I see that the quaternion-related matters in Mathematica are quite complicated. I will first try to see if the standard package and your QuaternionsHM can be adapted to my use case.

Thanks for your help.

POSTED BY: A Kim
Posted 1 year ago

Is there any way to explicitly handle the unit quaternion for the rotation?

Not clear to me what you mean. Please explain a bit more.

Also how can I get the components of the inverse quaternion?

Use Conjugate[q] if the quaternion is symbolic, otherwise you can also use q^-1

Note also that the standard package does not handle symbolic quaternions

POSTED BY: Hans Milton
Posted 1 year ago

Not clear to me what you mean. Please explain a bit more.

Sorry. My understanding and explanation was not clear enough.

For example, Julia's library rotation.jl has a QuatRotation that represents a unit quaternion. Since your package is 3D rotation oriented, I was wondering if you have such a mechanism.

Use Conjugate[q] if the quaternion is symbolic, otherwise you can also use q^-1

I got it!

Note also that the standard package does not handle symbolic quaternions

Oh,really? I had not considered that some mathematica packages do not support symbolic processing.

There is a description of quaternion on this page, but does it not support symbolic processing?

POSTED BY: A Kim
Posted 1 year ago

For example, Julia's library rotation.jl has a QuatRotation that represents a unit quaternion. Since your package is 3D rotation oriented, I was wondering if you have such a mechanism.

The function that converts a quaternion to explicit rotation parameters is quatToFromθV[quat]. Numeric input will be normalized, while symbolic input is assumed to be normalized.

POSTED BY: Hans Milton
Posted 1 year ago

As an alternative to the Wolfram standard quaternions package, you could check this one on GitHub.

A pdf overview is attached

Attachments:
POSTED BY: Hans Milton
Posted 1 year ago

Hello,

Thank you for introducing me to your wonderful package.

I want to find the derivatives of the cost function using quaternion so I will treat it symbolically.

Is there any way to explicitly handle the unit quaternion for the rotation? Also how can I get the components of the inverse quaternion?

I have no knowledge of mathematica, so I would like to know why such a basic functionality does not exist in the standard package.

POSTED BY: A Kim

Time permitting, please consider packaging this and contributing to the Wolfram Function Repository.

POSTED BY: Daniel Lichtblau
Posted 1 year ago

Will do

POSTED BY: Hans Milton
Posted 1 year ago

Daniel, I replied too quickly. This is a package with about 1000 lines of code distributed over 94 separate functions. So I think it is beyond the scope of the Function Repository.

POSTED BY: Hans Milton

It could still be a good item in the newer paclet repository. Alternatively, have a look at EisensteinIntegers in the Wolfram Function Repository for a way to bundle functionality that might be applicable here as well.

POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract