-
-
Notifications
You must be signed in to change notification settings - Fork 462
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
Dual Quaternions for Rigid Body Transforms #487
Comments
Hi! Adding dual quaternions would be a very interesting addition to nalgebra! As far as I know, nobody is working on this right now so your contribution is welcome! I'd be curious to see how dual quaternions compare to the existing If you need guidance, I suggest you open a pull-request even if you have not yet finished, and request for reviews when you need them. You should also see how quaternions are currently implemented. In particular, following the same file structure you should add:
Of course don't hesitate to ask questions on github, or on the nalgebra discord chanel! |
dual quaternions are also really useful to avoid some artifacts while doing mesh skinning compared to using matrices |
Should I work on the master branch or create a new feature branch? |
Master is okay, we don't have specific rules for the source branch of pull-requests.
That would be great! |
I would love to see this revived. I believe DualQuaternions would make a great addition to nalgebra as they find more and more use in different engineering categories (robotics, aerospace, etc.) and game development. Are there people interested in working on this together? |
I'm sorry I didn't get to the fork, finals came up right after this and it slipped my mind. I don't think I could head it but I would definitely be interested in contributing. It'd be very interesting to try out for games, and I bet CPUs with wide SIMD registers may be able to compute with them very efficiently. On another note, for rotations I wonder if wedge products are a better fit than quaternions? They generalize to higher dimensions while iirc quaternions only represent rotations in three and four dimensions, and they're similar in practice |
The main advantage of DQs is that they are excellent for linear blending / interpolation. In practice this means that they are excellent for vertex skinning. If you interpolate two DQs you will get the shorted path rotation between them. vs. you can't just blend two Isometry3 and get a shorted path rotation between them. I was in the middle of writing a DQ multiply function in a project and thought... How come nalgebra doesn't have this. Just found this issue - glad to see that there's interest. Here's how I see the path forwards:
Basically I think that this will be more likely to progress as a lot of small additions instead of one big PR adding full DQ support. I'll PR step number one and if it lands I'd be happy to follow up with PRs contributing misc DQ code I have stored in misc places. |
@chinedufn Sounds like a reasonable way forward, yes. |
This commit introduces the `DualQuaternion` type, in line with the plan laid out in [dimforge#487]. [dimforge#487]: dimforge#487
This commit introduces the `DualQuaternion` type, in line with the plan laid out in [dimforge#487]. [dimforge#487]: dimforge#487
This commit introduces the `DualQuaternion` type, in line with the plan laid out in [dimforge#487]. [dimforge#487]: dimforge#487
I know I was the one to make this issue originally, but I've been learning about geometric algebra for my research and I think it's a far better domain than the hypercomplex numbers. They're largely equivalent in two and three dimensions (see this excellent blog post: https://marctenbosch.com/quaternions/), and they generalize efficiently to higher dimensions (rotations in |
This commit introduces the `DualQuaternion` type, in line with the plan laid out in [dimforge#487]. [dimforge#487]: dimforge#487
I think that this can be closed |
#824 should add the majority of missing functionality; but let me know if there's something that I missed, because I'd be glad to help complete it. |
Hi there, |
Dual quaternions can represent all of rigid body transformations (translation + rotation), with some advantages over matrixes:
They also keep the simplicity of combining transformations is just multiplication.
A downside is that they only work for 3 dimensions (if I understand correctly), but given a large portion of users likely will be using only 3D geometry (for graphics, etc), it might be worth it. Also, there is already support for non-dual quaternions, so there is some interest.
Many of you probably already know this, just thought I'd document the case for them as I understand it.
If people are interested in this, I'll create a fork and add the feature? This is my first time contributing to an open-source project on github, so I may need a little guidance... Or, if someone else is interested in writing it that would work as well.
The text was updated successfully, but these errors were encountered: