You realize that the rotation axis depends on the magnitude of your rot[XYZ] now? Turning 1 degree on each axis 30 times isn't the same as turning 30 degrees on each axis once. Try a single CreateFromAxisAngle, or use e^(rotX*i/2 + rotY*j/2 + rotZ*k/2). It's the limit of taking ever smaller steps, treating all axes equally. It's equivalent to CreateFromAxisAngle(normalize(v), length(v)), if that seems easier. ;-)
@sacredgeometry LOL. with Visual Studio, you can highlight a large block of text an click the comment icon. It automatically inserts a // in front of each highlighted line for you. It's actually faster and fewer key/mouse strokes than the /*...*/
Looking at the 'figure eight' rotation -- to get back to the original state -- I'm suddenly wondering if this math would explain anything to do with integer multiple spin of bosons (or n/2 of fermions) in quantum theory...
I was actually looking for a mathematical answer. I have quaternion data at several positions in space( measured by distance). How is it possible that I can do mapping with it?
i know that quaternion are used for orientation....is it possible to do 3D mapping with them as well?
The first method can suffer from error creep, where floating point error can start to get pretty large if you keep concatenating the quats like that. You can normalize the quaternion, to help with this, but if you increment the rot{x,y,z} variables you get a fresh quat every time and wouldn't suffer from error creep.
@chordogg Your point is misleading. It has a thread of truth running through it but no practical value. It's like saying "don't build a house out of wood because it will rot a little year after year and add up". So what?, it's still worth it. The real problem would be when it's not normalized like you mentioned, then errors compound, with normalization, they merely add. It would take tens of hours of constant error adding to visually notice the error.
@chordogg: Also, the error added by the quats is no different than the error added by your 3 rotation angles that you will use to build a quat. Your angle approach will have the same error as the quat adding approach.... but without the difficulty of the trigonometry involved in trying to keep constant angular velocities. There is no benefit to using the angular approach. In fact, it is a less desiriable way to go.
@sh8zen Thanks for your post, sh8zen, I forgot all about this thread! It's funny you posted this because a friend and I are working on a simple 3D space shooter and we want full 6DoF and that definitely helps. I've always had a hard time understanding rotations, and an even harder time understandings quaternions!
@chordogg Your welcome. I know what you mean, the mental pictures I use to visualize rotations are always evolving as I learn more. It takes a while. Fell free to post a question if you need to.. or actually, the forums would be the best place. Good luck with the space shooter.
OK, that's much like my programming. Was an eye-opener for me when I worked out how to represent rotations with quaternions - and then even more so when I learnt how to motivate it by thinking about SU(2), the Riemann sphere and Mobius transforms. There's some decent websites out there about it.
Hah, wow, Thanks for going through the trouble to do that. That's pretty neat. We pretty much are talking about the same thing, the rotation pattern looks very very similar to what I'm getting, the only difference being that the objects' registration points for me are in the center of the object, but that doesn't really make a difference.
Thanks for all the help, I'll mark this as answered. :)
Can you actually share the script for this? I've been trying to figure out how to do exactly what you're showing the demo, but haven't been able to.
Aramyth008 1 month ago
You realize that the rotation axis depends on the magnitude of your rot[XYZ] now? Turning 1 degree on each axis 30 times isn't the same as turning 30 degrees on each axis once. Try a single CreateFromAxisAngle, or use e^(rotX*i/2 + rotY*j/2 + rotZ*k/2). It's the limit of taking ever smaller steps, treating all axes equally. It's equivalent to CreateFromAxisAngle(normalize(v), length(v)), if that seems easier. ;-)
EllipticGeometry 2 months ago
Thanks for the video, just one thing. Why don't you you use multiline comments? I'm guessing in the language you are using (c#)? its /* */
sacredgeometry 6 months ago
@sacredgeometry LOL. with Visual Studio, you can highlight a large block of text an click the comment icon. It automatically inserts a // in front of each highlighted line for you. It's actually faster and fewer key/mouse strokes than the /*...*/
sh8zen 6 months ago
@sh8zen ahh I thought it wraps them with /*... */ ive been using macs too long :)
sacredgeometry 6 months ago
@sh8zen and that made you LOL? You need to get out more.
DaveCalx 3 months ago
Looking at the 'figure eight' rotation -- to get back to the original state -- I'm suddenly wondering if this math would explain anything to do with integer multiple spin of bosons (or n/2 of fermions) in quantum theory...
Trotskisty 6 months ago
What the fuck...
Kcmasterpiece347 7 months ago
Yes! That helped me! Thx
ioulian 1 year ago
It doesn't yield the same values because quaternions are noncommutative? still trying to understand them..
MHUnited1 1 year ago
hey,...how can we convert quaternions into Cartesian vector forms?
shahzad113 1 year ago
@shahzad113 it is on the 3d math page of the xna wiki. find the "Convert a quaternion to a vector3" section near the bottom of the page
sh8zen 1 year ago
@sh8zen thanks sh8zen for your comment.
I was actually looking for a mathematical answer. I have quaternion data at several positions in space( measured by distance). How is it possible that I can do mapping with it?
i know that quaternion are used for orientation....is it possible to do 3D mapping with them as well?
shahzad113 1 year ago
@shahzad113 That I don't know
sh8zen 1 year ago
The first method can suffer from error creep, where floating point error can start to get pretty large if you keep concatenating the quats like that. You can normalize the quaternion, to help with this, but if you increment the rot{x,y,z} variables you get a fresh quat every time and wouldn't suffer from error creep.
chordogg 2 years ago
@chordogg Your point is misleading. It has a thread of truth running through it but no practical value. It's like saying "don't build a house out of wood because it will rot a little year after year and add up". So what?, it's still worth it. The real problem would be when it's not normalized like you mentioned, then errors compound, with normalization, they merely add. It would take tens of hours of constant error adding to visually notice the error.
sh8zen 1 year ago
@chordogg: Also, the error added by the quats is no different than the error added by your 3 rotation angles that you will use to build a quat. Your angle approach will have the same error as the quat adding approach.... but without the difficulty of the trigonometry involved in trying to keep constant angular velocities. There is no benefit to using the angular approach. In fact, it is a less desiriable way to go.
sh8zen 1 year ago
@sh8zen Thanks for your post, sh8zen, I forgot all about this thread! It's funny you posted this because a friend and I are working on a simple 3D space shooter and we want full 6DoF and that definitely helps. I've always had a hard time understanding rotations, and an even harder time understandings quaternions!
chordogg 1 year ago
@chordogg Your welcome. I know what you mean, the mental pictures I use to visualize rotations are always evolving as I learn more. It takes a while. Fell free to post a question if you need to.. or actually, the forums would be the best place. Good luck with the space shooter.
sh8zen 1 year ago
OK, that's much like my programming. Was an eye-opener for me when I worked out how to represent rotations with quaternions - and then even more so when I learnt how to motivate it by thinking about SU(2), the Riemann sphere and Mobius transforms. There's some decent websites out there about it.
ortega24024 2 years ago
Nice video, but you can't read the text in the video.
FunGuyInDFW 3 years ago
HQ it
turkishsniper 2 years ago
Hah, wow, Thanks for going through the trouble to do that. That's pretty neat. We pretty much are talking about the same thing, the rotation pattern looks very very similar to what I'm getting, the only difference being that the objects' registration points for me are in the center of the object, but that doesn't really make a difference.
Thanks for all the help, I'll mark this as answered. :)
Corwin
Corwynn 4 years ago