-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rigid transforms using unit quaternions to represent rotation #382
Comments
Quaternions are implemented as a field that can underly a manifold (just enter Semidirect products only make sense between two groups. So you would need to decorate a sphere with a relevant group operation in order to make this work. #25 experimented with doing just that, calling a The right thing to do here is probably to implement quaternions as a group. There are several equivalent ways to do this. One would be The next component you would need is an action of one of these points upon a translation vector, similar to our |
I should note that while this may sound complicated, it really isn't; the complication is just the design decision of which of these isomorphic groups to choose to implement. |
Thank you, that answers all of my questions. I'll wait for PR #345 then as I'm also not in a hurry and have enough to carry on with. |
I see with the release of Manifolds v0.8.18 #345 was replaced by #499. I think we should therefore be able to close this issue? |
We don't quite have the quaternionic unitary group tested yet but thanks to @kellertuer 's work we are most of the way there. |
Oh, well spotted (and sorry that it took a year to find time to finish that, we are not that many active developers of stuff here). What do we miss for the quaternionic case? |
What we miss is mostly docs, tests and maybe special-casing of some operations. |
I'll make a quick PR with that. |
Another option entirely is julia> using Manifolds, Quaternions, LinearAlgebra
julia> M = Sphere(0, ℍ)
Sphere(0, ℍ)
julia> p = [one(QuaternionF64)]
1-element Vector{QuaternionF64}:
QuaternionF64(1.0, 0.0, 0.0, 0.0, true)
julia> X = project(M, p, rand(QuaternionF64, 1))
1-element Vector{QuaternionF64}:
QuaternionF64(0.0, 0.011772950124829262, 0.38155684156501735, 0.7096819017054976, false)
julia> is_vector(M, p, X)
true
julia> exp(M, p, X)
1-element Vector{QuaternionF64}:
QuaternionF64(0.6925079449916864, 0.010539514911209379, 0.3415816748146443, 0.6353295398292529, false)
julia> q = exp(M, p, X)
1-element Vector{QuaternionF64}:
QuaternionF64(0.6925079449916864, 0.010539514911209379, 0.3415816748146443, 0.6353295398292529, false)
julia> log(M, p, q)
1-element Vector{QuaternionF64}:
QuaternionF64(0.0, 0.011772950124829262, 0.38155684156501735, 0.7096819017054976, false)
julia> norm(q)
0.9999999999999999 |
Related to the rabbit hole part of #358 where
M = Sphere(3,ℍ)
was mentioned to represent unit quaternions.I was looking at using a semidirect product manifold of
T(3) ⋊ Sphere(3,ℍ)
or similar to compare withSE(3)
I cannot find a lot in the documentation on quaternions though.
Are quaternions implemented? If so how does the representation look?
Is there a Lie group/algebra implemented for Sphere or similar?
It is not something that is immediately needed at all, I was just curious.
I also don't know if it will be worth it yet.
The text was updated successfully, but these errors were encountered: